Skip to content

Commit

Permalink
fix: add prisma migration file
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Aug 13, 2024
1 parent dbcbc0a commit b3fed54
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions prisma/migrations/20240813062058_init/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-- CreateTable
CREATE TABLE "Query" (
"id" TEXT NOT NULL,
"query" TEXT NOT NULL,
"keyword" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"answer" TEXT,
"references" JSONB NOT NULL DEFAULT '[]',
"pin" BOOLEAN NOT NULL DEFAULT false,
"owner_id" TEXT,

CONSTRAINT "Query_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"clerk_user_id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE INDEX "Query_owner_id_idx" ON "Query"("owner_id");

-- CreateIndex
CREATE UNIQUE INDEX "User_clerk_user_id_key" ON "User"("clerk_user_id");
3 changes: 3 additions & 0 deletions prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit b3fed54

Please sign in to comment.