chore: add initial migration for db

This commit is contained in:
Andrea 2023-03-03 09:24:54 +01:00
parent 5aa92be838
commit 1b4ec1ef6d
No known key found for this signature in database
GPG Key ID: 4594610B9C8F91C5
3 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"private": true,
"sideEffects": false,
"scripts": {
"build": "remix build",
"build": "prisma generate && prisma migrate deploy && remix build",
"dev": "remix dev",
"start": "remix-serve build",
"typecheck": "tsc"

View File

@ -0,0 +1,12 @@
-- CreateTable
CREATE TABLE "Post" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT,
"path" TEXT NOT NULL,
"isPublic" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Post_pkey" PRIMARY KEY ("id")
);

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 = "postgresql"