-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ydennisy/chore/simplify-db-schema
chore: refactor db schema to simple flat tables
- Loading branch information
Showing
33 changed files
with
900 additions
and
595 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 0 additions & 77 deletions
77
backend/prisma/migrations/20231119091508_init_tables/migration.sql
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
backend/prisma/migrations/20231119091949_add_initial_counter/migration.sql
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
backend/prisma/migrations/20231126122313_init_tables/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-- CreateTable | ||
CREATE TABLE "web_pages" ( | ||
"id" TEXT NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
"url" TEXT NOT NULL, | ||
"title" TEXT NOT NULL, | ||
"domain" TEXT NOT NULL, | ||
"content" TEXT NOT NULL, | ||
"embedding" vector(1536), | ||
|
||
CONSTRAINT "web_pages_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "notes" ( | ||
"id" TEXT NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
"title" TEXT NOT NULL, | ||
"content" TEXT NOT NULL, | ||
"embedding" vector(1536), | ||
|
||
CONSTRAINT "notes_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "papers" ( | ||
"id" TEXT NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
"title" TEXT NOT NULL, | ||
"author" TEXT NOT NULL, | ||
"url" TEXT NOT NULL, | ||
"content" TEXT NOT NULL, | ||
"embedding" vector(1536), | ||
|
||
CONSTRAINT "papers_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "counters" ( | ||
"id" SERIAL NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"value" INTEGER NOT NULL, | ||
|
||
CONSTRAINT "counters_pkey" PRIMARY KEY ("id") | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.