-
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.
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -17,4 +17,4 @@ out/ | |
!.env.example | ||
|
||
# DB | ||
prisma/*.db | ||
prisma/*.db* |
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,34 @@ | ||
-- CreateTable | ||
CREATE TABLE "Byte" ( | ||
"id" TEXT NOT NULL PRIMARY KEY, | ||
"slug" TEXT NOT NULL, | ||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"title" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"content" BLOB NOT NULL | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Tag" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"name" TEXT NOT NULL | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "_ByteToTag" ( | ||
"A" TEXT NOT NULL, | ||
"B" INTEGER NOT NULL | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Byte_slug_key" ON "Byte"("slug"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Tag_name_key" ON "Tag"("name"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "_ByteToTag_AB_unique" ON "_ByteToTag"("A", "B"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "_ByteToTag_B_index" ON "_ByteToTag"("B"); |
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,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "sqlite" |