Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
Created November 5, 2022 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuc-arc-f/256b9e37c2c31311af67a5a068ff8e33 to your computer and use it in GitHub Desktop.
Save kuc-arc-f/256b9e37c2c31311af67a5a068ff8e33 to your computer and use it in GitHub Desktop.
SQLite 3 WASM , migration file
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Post {
id Int @id @default(autoincrement())
title String?
content String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userId Int?
CategoryId Int?
}
model Page {
id Int @id @default(autoincrement())
title String?
content String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userId Int?
}
model Category {
id Int @id @default(autoincrement())
name String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userId Int?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment