Back to Graphql

Migration `20200415083240`

__fixtures__/example-todo-main/api/prisma/migrations/20200415083240/README.md

8.9.0943 B
Original Source

Migration 20200415083240

This migration has been generated by Peter Pistorius at 4/15/2020, 8:32:40 AM. You can check out the state of the schema after the migration.

Database Steps

sql
CREATE TABLE "quaint"."Todo" (
    "body" TEXT NOT NULL  ,
    "id" INTEGER NOT NULL  PRIMARY KEY AUTOINCREMENT,
    "status" TEXT NOT NULL DEFAULT 'off' 
) 

CREATE UNIQUE INDEX "quaint"."Todo.body" ON "Todo"("body")

Changes

diff
diff --git schema.prisma schema.prisma
migration ..20200415083240
--- datamodel.dml
+++ datamodel.dml
@@ -1,0 +1,17 @@
+datasource sqlite {
+  url      = "file:./dev.sqlite"
+  provider = "sqlite"
+}
+
+generator photonjs {
+  provider = "prisma-client-js"
+}
+
+// Define your own models here and run `yarn rw db save` to create
+// migrations for them.
+
+model Todo {
+  id     Int    @id @default(autoincrement())
+  body   String @unique
+  status String @default("off")
+}