Files
redwood-tutorial/api/prisma/migrations/20201007180930-create-contact
2020-10-07 14:41:40 -07:00
..
2020-10-07 14:41:40 -07:00
2020-10-07 14:41:40 -07:00
2020-10-07 14:41:40 -07:00

Migration 20201007180930-create-contact

This migration has been generated by Rob Cameron at 10/7/2020, 11:09:30 AM. You can check out the state of the schema after the migration.

Database Steps

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 --git schema.prisma schema.prisma
migration 20201007174432-create-posts..20201007180930-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"
@@ -15,4 +15,12 @@
   title     String
   body      String
   createdAt DateTime @default(now())
 }
+
+model Contact {
+  id        Int      @id @default(autoincrement())
+  name      String
+  email     String
+  message   String
+  createdAt DateTime @default(now())
+}