chapter 2

This commit is contained in:
Colin Diem
2022-04-14 21:57:50 -04:00
parent 6131eda9f6
commit 0c47db9001
36 changed files with 1294 additions and 9 deletions

View File

@@ -0,0 +1,7 @@
-- CreateTable
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
);

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"

View File

@@ -8,11 +8,9 @@ generator client {
binaryTargets = "native"
}
// Define your own datamodels here and run `yarn redwood prisma migrate dev`
// to create migrations for them and apply to your dev DB.
// TODO: Please remove the following example:
model UserExample {
id Int @id @default(autoincrement())
email String @unique
name String?
model Post {
id Int @id @default(autoincrement())
title String
body String
createdAt DateTime @default(now())
}