Files
cadhub/api/prisma/migrations/20201011095227-create-contact/README.md
2020-10-12 19:19:27 +11:00

51 lines
1.1 KiB
Markdown

# Migration `20201011095227-create-contact`
This migration has been generated by Kurt Hutten at 10/11/2020, 8:52:27 PM.
You can check out the [state of the schema](./schema.prisma) after the migration.
## Database Steps
```sql
CREATE TABLE "Contact" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" TEXT NOT NULL,
"email" TEXT NOT NULL,
"message" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
)
```
## Changes
```diff
diff --git schema.prisma schema.prisma
migration 20201011082558-add-code-not-needed-upon-create..20201011095227-create-contact
--- datamodel.dml
+++ datamodel.dml
@@ -1,9 +1,9 @@
datasource DS {
// optionally set multiple providers
// example: provider = ["sqlite", "postgresql"]
provider = "sqlite"
- url = "***"
+ url = "***"
}
generator client {
provider = "prisma-client-js"
@@ -26,4 +26,12 @@
createdAt DateTime @default(now())
// userId
//likes, comments, reactions
}
+
+model Contact {
+ id Int @id @default(autoincrement())
+ name String
+ email String
+ message String
+ createdAt DateTime @default(now())
+}
```