-
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
1 parent
07fe4e8
commit 78b516f
Showing
27 changed files
with
465 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
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,49 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `Source` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "public"."Source" DROP CONSTRAINT "Source_userId_fkey"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Source"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."User"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" SERIAL NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"password" TEXT NOT NULL, | ||
"name" TEXT, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Source" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Source_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Source_dir_key" ON "Source"("dir"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Source" ADD CONSTRAINT "Source_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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,49 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `Source` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "public"."Source" DROP CONSTRAINT "Source_userId_fkey"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Source"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."User"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" SERIAL NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"password" TEXT NOT NULL, | ||
"name" TEXT, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Source" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Source_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Source_dir_key" ON "Source"("dir"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Source" ADD CONSTRAINT "Source_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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,67 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `Source` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "public"."Source" DROP CONSTRAINT "Source_userId_fkey"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Source"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."User"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" SERIAL NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"password" TEXT NOT NULL, | ||
"name" TEXT, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Source" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Source_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Target" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Target_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Source_dir_key" ON "Source"("dir"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Target_dir_key" ON "Target"("dir"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Source" ADD CONSTRAINT "Source_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Target" ADD CONSTRAINT "Target_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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,77 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `Source` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `Target` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "public"."Source" DROP CONSTRAINT "Source_userId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "public"."Target" DROP CONSTRAINT "Target_userId_fkey"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Source"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Target"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."User"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" SERIAL NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"password" TEXT NOT NULL, | ||
"name" TEXT, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Source" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Source_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Target" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Target_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Source_dir_key" ON "Source"("dir"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Target_dir_key" ON "Target"("dir"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Target_userId_key" ON "Target"("userId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Source" ADD CONSTRAINT "Source_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Target" ADD CONSTRAINT "Target_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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,77 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `Source` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `Target` table. If the table is not empty, all the data it contains will be lost. | ||
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "public"."Source" DROP CONSTRAINT "Source_userId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "public"."Target" DROP CONSTRAINT "Target_userId_fkey"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Source"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."Target"; | ||
|
||
-- DropTable | ||
DROP TABLE "public"."User"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" SERIAL NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"password" TEXT NOT NULL, | ||
"name" TEXT, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Source" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Source_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Target" ( | ||
"id" SERIAL NOT NULL, | ||
"dir" TEXT NOT NULL, | ||
"status" BOOLEAN NOT NULL DEFAULT false, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Target_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Source_dir_key" ON "Source"("dir"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Target_dir_key" ON "Target"("dir"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Target_userId_key" ON "Target"("userId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Source" ADD CONSTRAINT "Source_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Target" ADD CONSTRAINT "Target_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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
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.