diff options
| author | Factiven <[email protected]> | 2023-08-09 20:32:03 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-09 20:32:03 +0700 |
| commit | e740f670e13f399c0b44af4a8615d7e868212116 (patch) | |
| tree | 23186244891d5a73b2ffe1e108743e0775ca584f /prisma/migrations | |
| parent | Update v3.9.0 - Merged Beta to Main (#41) (diff) | |
| download | moopa-3.9.1.tar.xz moopa-3.9.1.zip | |
Update v3.9.1 - Merged Beta to Main (#44)v3.9.1
* commit
* update db
* Update v3.9.1-beta-v3.1
* Update v3.9.1
Diffstat (limited to 'prisma/migrations')
| -rw-r--r-- | prisma/migrations/20230809105139_init/migration.sql | 32 | ||||
| -rw-r--r-- | prisma/migrations/migration_lock.toml | 3 |
2 files changed, 35 insertions, 0 deletions
diff --git a/prisma/migrations/20230809105139_init/migration.sql b/prisma/migrations/20230809105139_init/migration.sql new file mode 100644 index 0000000..67268c9 --- /dev/null +++ b/prisma/migrations/20230809105139_init/migration.sql @@ -0,0 +1,32 @@ +-- CreateTable +CREATE TABLE "UserProfile" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "setting" JSONB, + + CONSTRAINT "UserProfile_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "WatchListEpisode" ( + "id" TEXT NOT NULL, + "aniId" TEXT, + "title" TEXT, + "aniTitle" TEXT, + "image" TEXT, + "episode" INTEGER, + "timeWatched" INTEGER, + "duration" INTEGER, + "provider" TEXT, + "createdDate" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP, + "userProfileId" TEXT NOT NULL, + "watchId" TEXT NOT NULL, + + CONSTRAINT "WatchListEpisode_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "UserProfile_name_key" ON "UserProfile"("name"); + +-- AddForeignKey +ALTER TABLE "WatchListEpisode" ADD CONSTRAINT "WatchListEpisode_userProfileId_fkey" FOREIGN KEY ("userProfileId") REFERENCES "UserProfile"("name") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..fbffa92 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -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"
\ No newline at end of file |