Files
cadhub/api/prisma/migrations/20201009213512-create-posts/README.md
2020-10-10 11:26:25 +11:00

970 B

Migration 20201009213512-create-posts

This migration has been generated by Kurt Hutten at 10/10/2020, 8:35:12 AM. You can check out the state of the schema after the migration.

Database Steps

CREATE TABLE "Post" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "title" TEXT NOT NULL,
    "body" TEXT NOT NULL,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
)

Changes

diff --git schema.prisma schema.prisma
migration ..20201009213512-create-posts
--- datamodel.dml
+++ datamodel.dml
@@ -1,0 +1,18 @@
+datasource DS {
+  // optionally set multiple providers
+  // example: provider = ["sqlite", "postgresql"]
+  provider = "sqlite"
+  url = "***"
+}
+
+generator client {
+  provider      = "prisma-client-js"
+  binaryTargets = "native"
+}
+
+model Post {
+  id        Int      @id @default(autoincrement())
+  title     String
+  body      String
+  createdAt DateTime @default(now())
+}