From 09cd6529fcd02b69283432d31a6960354c45e811 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 27 Mar 2024 20:59:51 +0000 Subject: [PATCH] chore: migrate to postgres --- bun.lockb | Bin 285453 -> 292190 bytes drizzle.config.ts | 6 +- package.json | 6 +- src/env.mjs | 6 +- src/server/auth.ts | 4 +- src/server/db/index.ts | 12 +- .../db/migrations/0000_hesitant_nocturne.sql | 81 -- .../db/migrations/0000_legal_quicksilver.sql | 317 +++++ .../migrations/0001_warm_jamie_braddock.sql | 4 - .../db/migrations/0002_colossal_randall.sql | 2 - .../db/migrations/0003_heavy_thanos.sql | 20 - .../db/migrations/0004_tidy_lord_hawal.sql | 1 - .../db/migrations/0005_hard_colossus.sql | 2 - .../db/migrations/0006_lame_pepper_potts.sql | 2 - src/server/db/migrations/0007_open_nuke.sql | 15 - .../migrations/0008_modern_night_thrasher.sql | 16 - .../migrations/0009_massive_peter_parker.sql | 1 - .../db/migrations/0010_jittery_zzzax.sql | 16 - .../migrations/0011_familiar_aaron_stack.sql | 1 - .../db/migrations/0012_powerful_gressill.sql | 8 - .../db/migrations/meta/0000_snapshot.json | 1026 +++++++++++++--- .../db/migrations/meta/0001_snapshot.json | 494 -------- .../db/migrations/meta/0002_snapshot.json | 508 -------- .../db/migrations/meta/0003_snapshot.json | 639 ---------- .../db/migrations/meta/0004_snapshot.json | 647 ---------- .../db/migrations/meta/0005_snapshot.json | 661 ----------- .../db/migrations/meta/0006_snapshot.json | 675 ----------- .../db/migrations/meta/0007_snapshot.json | 769 ------------ .../db/migrations/meta/0008_snapshot.json | 864 -------------- .../db/migrations/meta/0009_snapshot.json | 870 -------------- .../db/migrations/meta/0010_snapshot.json | 992 ---------------- .../db/migrations/meta/0011_snapshot.json | 992 ---------------- .../db/migrations/meta/0012_snapshot.json | 1050 ----------------- src/server/db/migrations/meta/_journal.json | 92 +- src/server/db/schema.ts | 194 ++- 35 files changed, 1270 insertions(+), 9723 deletions(-) delete mode 100644 src/server/db/migrations/0000_hesitant_nocturne.sql create mode 100644 src/server/db/migrations/0000_legal_quicksilver.sql delete mode 100644 src/server/db/migrations/0001_warm_jamie_braddock.sql delete mode 100644 src/server/db/migrations/0002_colossal_randall.sql delete mode 100644 src/server/db/migrations/0003_heavy_thanos.sql delete mode 100644 src/server/db/migrations/0004_tidy_lord_hawal.sql delete mode 100644 src/server/db/migrations/0005_hard_colossus.sql delete mode 100644 src/server/db/migrations/0006_lame_pepper_potts.sql delete mode 100644 src/server/db/migrations/0007_open_nuke.sql delete mode 100644 src/server/db/migrations/0008_modern_night_thrasher.sql delete mode 100644 src/server/db/migrations/0009_massive_peter_parker.sql delete mode 100644 src/server/db/migrations/0010_jittery_zzzax.sql delete mode 100644 src/server/db/migrations/0011_familiar_aaron_stack.sql delete mode 100644 src/server/db/migrations/0012_powerful_gressill.sql delete mode 100644 src/server/db/migrations/meta/0001_snapshot.json delete mode 100644 src/server/db/migrations/meta/0002_snapshot.json delete mode 100644 src/server/db/migrations/meta/0003_snapshot.json delete mode 100644 src/server/db/migrations/meta/0004_snapshot.json delete mode 100644 src/server/db/migrations/meta/0005_snapshot.json delete mode 100644 src/server/db/migrations/meta/0006_snapshot.json delete mode 100644 src/server/db/migrations/meta/0007_snapshot.json delete mode 100644 src/server/db/migrations/meta/0008_snapshot.json delete mode 100644 src/server/db/migrations/meta/0009_snapshot.json delete mode 100644 src/server/db/migrations/meta/0010_snapshot.json delete mode 100644 src/server/db/migrations/meta/0011_snapshot.json delete mode 100644 src/server/db/migrations/meta/0012_snapshot.json diff --git a/bun.lockb b/bun.lockb index a36f9c4cde35527b8e28b25caf390aebf6f0c3b0..ab43696753990ce2cbe6025b44ac165dd4baf9b2 100755 GIT binary patch delta 71892 zcmeFa37n1P|Nno^;bcyB5-OpxH+E*@j6J(3Yqr5)m@&+Zm?;iYNJ4j9B$Xl*l~k4z zTB%ejqLNgKcCD7w@AuBoRr_ZNNkH`Ptd3c@I^?qIZ`&#bnzGuum>yeUge^hc# z?Ha>|1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UKl1O%_Xo=X`{1J1O~7l^J<{0=BQ(Ob>i&~}>1mpD6P zUfkOZSCZ3n5`%-Au zOXWSDmo=qU-Kp?YjW_HPB>>?Wr6M+W_TKpWt=YJjpdqHH(hD2U{q4#oD`aV=plC(a z`pr_gg)tofcID0^vit9P)FZ8ub&bk8`}6qXYpvS+DJa~jyi4@XN3itKOVs`&+&vMu zo@pC?V26r6LaqL<*P#U=V;L@9^8chISLoYinB>Y2qO_2Hxk45n%f0HEUKNW><#X@X zugXuY?5C^QYszIo|*L?e4bzp7X4#-pbAZ-4gVY7LPwX z^wOkHGJXrt)N%1+`VKwc{+`p$IUTg$Ku9m${bP5$*W>{-YygJ-Pfx^}-Tz`>ReI9o z$i&e}Q6_u-nb2VE`<99GG0u!H3!Ay=gY7mgmf@Xa>D=aF=C3R~uC2j4kIp~6Muzs7 z((U`?#Hc8?LaRl0JdYd5cZF=2^Z(uHsHB9^iO{*k-*^B2^c`AM7gLFKDo)RTel#f9 zDcee&TQ`&Ejnj?kS7wWMo+q0p3|$i4x2OIo|66?cGkHis%TMGGQ(CZ6{-mJ8r}EMU z1;1s<@0(NXN)$s~zmgpr`AvyRjEstPNtl?F9FrJTF#0R`yj)OcubkMt;OH6o=tRma SkjK;6FJ-fWoF29Ic>XW2|7jio diff --git a/drizzle.config.ts b/drizzle.config.ts index 9ee8478f..8970fbd4 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -5,9 +5,9 @@ import { env } from "~/env.mjs"; export default { schema: "./src/server/db/schema.ts", out: "./src/server/db/migrations", - driver: "mysql2", + driver: "pg", dbCredentials: { - connectionString: env.DATABASE_URL, + connectionString: env.POSTGRES_URL, }, - tablesFilter: ["kan_*"], + // tablesFilter: ["kan_*"], } satisfies Config; diff --git a/package.json b/package.json index 2ab13caa..4bb55c3b 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "build": "next build", - "db:push": "dotenv drizzle-kit push:mysql", - "db:generate": "dotenv drizzle-kit generate:mysql", + "db:push": "dotenv drizzle-kit push:pg", + "db:generate": "dotenv drizzle-kit generate:pg", "db:migrate": "dotenv npx tsx ./src/server/db/migrate.ts", "db:studio": "dotenv drizzle-kit studio", "dev": "next dev", @@ -27,10 +27,12 @@ "@trpc/next": "^10.37.1", "@trpc/react-query": "^10.37.1", "@trpc/server": "^10.37.1", + "@vercel/postgres": "^0.7.2", "drizzle-orm": "^0.28.5", "formik": "^2.4.5", "next": "^13.5.4", "next-auth": "0.0.0-manual.cfb42ae7", + "postgres": "^3.4.4", "react": "18.2.0", "react-beautiful-dnd": "^13.1.1", "react-contenteditable": "^3.3.7", diff --git a/src/env.mjs b/src/env.mjs index 4b627b73..06896a09 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -7,11 +7,11 @@ export const env = createEnv({ * isn't built with invalid env vars. */ server: { - DATABASE_URL: z + POSTGRES_URL: z .string() .url() .refine( - (str) => !str.includes("YOUR_MYSQL_URL_HERE"), + (str) => !str.includes("YOUR_PG_URL_HERE"), "You forgot to change the default URL", ), NODE_ENV: z @@ -44,7 +44,7 @@ export const env = createEnv({ * middlewares) or client-side so we need to destruct manually. */ runtimeEnv: { - DATABASE_URL: process.env.DATABASE_URL, + POSTGRES_URL: process.env.POSTGRES_URL, NODE_ENV: process.env.NODE_ENV, NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET, NEXTAUTH_URL: process.env.NEXTAUTH_URL, diff --git a/src/server/auth.ts b/src/server/auth.ts index 80a8ba2e..3c72b498 100644 --- a/src/server/auth.ts +++ b/src/server/auth.ts @@ -5,7 +5,7 @@ import { DrizzleAdapter } from "@auth/drizzle-adapter"; import NextAuth, { type DefaultSession } from "next-auth"; import { db } from "~/server/db"; -import { mySqlTable } from "~/server/db/schema"; +import { pgTable} from "drizzle-orm/pg-core"; /** * Module augmentation for `next-auth` types. Allows us to add custom properties to the `session` @@ -45,7 +45,7 @@ export const { }, }), }, - adapter: DrizzleAdapter(db, mySqlTable), + adapter: DrizzleAdapter(db, pgTable), pages: { signIn: "/auth/login", // signOut: "/auth/signout", diff --git a/src/server/db/index.ts b/src/server/db/index.ts index 2a0c8e8f..1d2ddea5 100644 --- a/src/server/db/index.ts +++ b/src/server/db/index.ts @@ -1,12 +1,6 @@ -import { Client } from "@planetscale/database"; -import { drizzle } from "drizzle-orm/planetscale-serverless"; +import { sql } from '@vercel/postgres' +import { drizzle } from 'drizzle-orm/vercel-postgres' -import { env } from "~/env.mjs"; import * as schema from "./schema"; -export const db = drizzle( - new Client({ - url: env.DATABASE_URL, - }).connection(), - { schema } -); +export const db = drizzle(sql, { schema }) diff --git a/src/server/db/migrations/0000_hesitant_nocturne.sql b/src/server/db/migrations/0000_hesitant_nocturne.sql deleted file mode 100644 index 1c916e58..00000000 --- a/src/server/db/migrations/0000_hesitant_nocturne.sql +++ /dev/null @@ -1,81 +0,0 @@ -CREATE TABLE `account` ( - `userId` varchar(255) NOT NULL, - `type` varchar(255) NOT NULL, - `provider` varchar(255) NOT NULL, - `providerAccountId` varchar(255) NOT NULL, - `refresh_token` text, - `access_token` text, - `expires_at` int, - `token_type` varchar(255), - `scope` varchar(255), - `id_token` text, - `session_state` varchar(255), - CONSTRAINT `account_provider_providerAccountId` PRIMARY KEY(`provider`,`providerAccountId`) -); ---> statement-breakpoint -CREATE TABLE `board` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `name` varchar(255), - `createdBy` varchar(255) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `updatedAt` timestamp ON UPDATE CURRENT_TIMESTAMP, - CONSTRAINT `board_id` PRIMARY KEY(`id`), - CONSTRAINT `board_publicId_unique` UNIQUE(`publicId`) -); ---> statement-breakpoint -CREATE TABLE `card` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `title` varchar(256) NOT NULL, - `description` varchar(256), - `createdBy` varchar(256) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `updatedAt` timestamp ON UPDATE CURRENT_TIMESTAMP, - `listId` bigint NOT NULL, - `index` int NOT NULL, - CONSTRAINT `card_id` PRIMARY KEY(`id`), - CONSTRAINT `card_publicId_unique` UNIQUE(`publicId`), - CONSTRAINT `card_listId_index_unique` UNIQUE(`listId`,`index`) -); ---> statement-breakpoint -CREATE TABLE `list` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `name` varchar(256) NOT NULL, - `createdBy` varchar(256) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `updatedAt` timestamp ON UPDATE CURRENT_TIMESTAMP, - `boardId` bigint NOT NULL, - `index` int NOT NULL, - CONSTRAINT `list_id` PRIMARY KEY(`id`), - CONSTRAINT `list_publicId_unique` UNIQUE(`publicId`), - CONSTRAINT `list_boardId_index_unique` UNIQUE(`boardId`,`index`) -); ---> statement-breakpoint -CREATE TABLE `session` ( - `sessionToken` varchar(255) NOT NULL, - `userId` varchar(255) NOT NULL, - `expires` timestamp NOT NULL, - CONSTRAINT `session_sessionToken` PRIMARY KEY(`sessionToken`) -); ---> statement-breakpoint -CREATE TABLE `user` ( - `id` varchar(255) NOT NULL, - `name` varchar(255), - `email` varchar(255) NOT NULL, - `emailVerified` timestamp(3) DEFAULT CURRENT_TIMESTAMP(3), - `image` varchar(255), - CONSTRAINT `user_id` PRIMARY KEY(`id`), - CONSTRAINT `user_email_unique` UNIQUE(`email`) -); ---> statement-breakpoint -CREATE TABLE `verificationToken` ( - `identifier` varchar(255) NOT NULL, - `token` varchar(255) NOT NULL, - `expires` timestamp NOT NULL, - CONSTRAINT `verificationToken_identifier_token` PRIMARY KEY(`identifier`,`token`) -); ---> statement-breakpoint -CREATE INDEX `userId_idx` ON `account` (`userId`);--> statement-breakpoint -CREATE INDEX `userId_idx` ON `session` (`userId`); \ No newline at end of file diff --git a/src/server/db/migrations/0000_legal_quicksilver.sql b/src/server/db/migrations/0000_legal_quicksilver.sql new file mode 100644 index 00000000..c6d3ea79 --- /dev/null +++ b/src/server/db/migrations/0000_legal_quicksilver.sql @@ -0,0 +1,317 @@ +DO $$ BEGIN + CREATE TYPE "source" AS ENUM('trello'); +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + CREATE TYPE "status" AS ENUM('started', 'success', 'failed'); +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + CREATE TYPE "role" AS ENUM('admin', 'member', 'guest'); +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "account" ( + "userId" uuid NOT NULL, + "type" varchar(255) NOT NULL, + "provider" varchar(255) NOT NULL, + "providerAccountId" varchar(255) NOT NULL, + "refresh_token" text, + "access_token" text, + "expires_at" integer, + "token_type" varchar(255), + "scope" varchar(255), + "id_token" text, + "session_state" varchar(255), + CONSTRAINT account_provider_providerAccountId PRIMARY KEY("provider","providerAccountId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "board" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "name" varchar(255) NOT NULL, + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp, + "deletedAt" timestamp DEFAULT now(), + "deletedBy" uuid, + "importId" bigint, + "workspaceId" bigint NOT NULL, + CONSTRAINT "board_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "_card_workspace_members" ( + "cardId" bigint NOT NULL, + "workspaceMemberId" bigint NOT NULL, + CONSTRAINT _card_workspace_members_cardId_workspaceMemberId PRIMARY KEY("cardId","workspaceMemberId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "card" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "title" varchar(255) NOT NULL, + "description" text, + "index" integer NOT NULL, + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp, + "deletedAt" timestamp, + "deletedBy" uuid, + "listId" bigint NOT NULL, + "importId" bigint, + CONSTRAINT "card_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "_card_labels" ( + "cardId" bigint NOT NULL, + "labelId" bigint NOT NULL, + CONSTRAINT _card_labels_cardId_labelId PRIMARY KEY("cardId","labelId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "import" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "source" "source" NOT NULL, + "status" "status" NOT NULL, + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + CONSTRAINT "import_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "label" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "name" varchar(255) NOT NULL, + "colourCode" varchar(12), + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp, + "boardId" bigint NOT NULL, + "importId" bigint, + CONSTRAINT "label_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "list" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "name" varchar(255) NOT NULL, + "index" integer NOT NULL, + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp, + "deletedAt" timestamp, + "deletedBy" uuid, + "boardId" bigint NOT NULL, + "importId" bigint, + CONSTRAINT "list_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "session" ( + "sessionToken" varchar(255) PRIMARY KEY NOT NULL, + "userId" uuid NOT NULL, + "expires" timestamp NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "user" ( + "id" uuid PRIMARY KEY NOT NULL, + "name" varchar(255), + "email" varchar(255) NOT NULL, + "emailVerified" timestamp, + "image" varchar(255), + CONSTRAINT "user_email_unique" UNIQUE("email") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "verificationToken" ( + "identifier" varchar(255) NOT NULL, + "token" varchar(255) NOT NULL, + "expires" timestamp NOT NULL, + CONSTRAINT verificationToken_identifier_token PRIMARY KEY("identifier","token") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "workspace_members" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "userId" uuid NOT NULL, + "workspaceId" bigint NOT NULL, + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp, + "deletedAt" timestamp, + "role" "role" NOT NULL, + CONSTRAINT "workspace_members_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "workspace" ( + "id" bigserial PRIMARY KEY NOT NULL, + "publicId" varchar(12) NOT NULL, + "name" varchar(255) NOT NULL, + "slug" varchar(255) NOT NULL, + "createdBy" uuid NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp, + "deletedAt" timestamp, + "deletedBy" uuid, + CONSTRAINT "workspace_publicId_unique" UNIQUE("publicId"), + CONSTRAINT "workspace_slug_unique" UNIQUE("slug") +); +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "account" ADD CONSTRAINT "account_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "board" ADD CONSTRAINT "board_createdBy_user_id_fk" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "board" ADD CONSTRAINT "board_deletedBy_user_id_fk" FOREIGN KEY ("deletedBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "board" ADD CONSTRAINT "board_importId_import_id_fk" FOREIGN KEY ("importId") REFERENCES "import"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "board" ADD CONSTRAINT "board_workspaceId_workspace_id_fk" FOREIGN KEY ("workspaceId") REFERENCES "workspace"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "_card_workspace_members" ADD CONSTRAINT "_card_workspace_members_cardId_card_id_fk" FOREIGN KEY ("cardId") REFERENCES "card"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "_card_workspace_members" ADD CONSTRAINT "_card_workspace_members_workspaceMemberId_workspace_members_id_fk" FOREIGN KEY ("workspaceMemberId") REFERENCES "workspace_members"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "card" ADD CONSTRAINT "card_createdBy_user_id_fk" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "card" ADD CONSTRAINT "card_deletedBy_user_id_fk" FOREIGN KEY ("deletedBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "card" ADD CONSTRAINT "card_listId_list_id_fk" FOREIGN KEY ("listId") REFERENCES "list"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "card" ADD CONSTRAINT "card_importId_import_id_fk" FOREIGN KEY ("importId") REFERENCES "import"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "_card_labels" ADD CONSTRAINT "_card_labels_cardId_card_id_fk" FOREIGN KEY ("cardId") REFERENCES "card"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "_card_labels" ADD CONSTRAINT "_card_labels_labelId_label_id_fk" FOREIGN KEY ("labelId") REFERENCES "label"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "import" ADD CONSTRAINT "import_createdBy_user_id_fk" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "label" ADD CONSTRAINT "label_createdBy_user_id_fk" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "label" ADD CONSTRAINT "label_boardId_board_id_fk" FOREIGN KEY ("boardId") REFERENCES "board"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "label" ADD CONSTRAINT "label_importId_import_id_fk" FOREIGN KEY ("importId") REFERENCES "import"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "list" ADD CONSTRAINT "list_createdBy_user_id_fk" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "list" ADD CONSTRAINT "list_deletedBy_user_id_fk" FOREIGN KEY ("deletedBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "list" ADD CONSTRAINT "list_boardId_board_id_fk" FOREIGN KEY ("boardId") REFERENCES "board"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "list" ADD CONSTRAINT "list_importId_import_id_fk" FOREIGN KEY ("importId") REFERENCES "import"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "session" ADD CONSTRAINT "session_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "workspace_members" ADD CONSTRAINT "workspace_members_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "workspace_members" ADD CONSTRAINT "workspace_members_workspaceId_workspace_id_fk" FOREIGN KEY ("workspaceId") REFERENCES "workspace"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "workspace" ADD CONSTRAINT "workspace_createdBy_user_id_fk" FOREIGN KEY ("createdBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "workspace" ADD CONSTRAINT "workspace_deletedBy_user_id_fk" FOREIGN KEY ("deletedBy") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; diff --git a/src/server/db/migrations/0001_warm_jamie_braddock.sql b/src/server/db/migrations/0001_warm_jamie_braddock.sql deleted file mode 100644 index 0ab83c3e..00000000 --- a/src/server/db/migrations/0001_warm_jamie_braddock.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `card` DROP CONSTRAINT `card_listId_index_unique`;--> statement-breakpoint -ALTER TABLE `list` DROP CONSTRAINT `list_boardId_index_unique`;--> statement-breakpoint -ALTER TABLE `board` MODIFY COLUMN `name` varchar(255) NOT NULL;--> statement-breakpoint -ALTER TABLE `card` MODIFY COLUMN `description` text; \ No newline at end of file diff --git a/src/server/db/migrations/0002_colossal_randall.sql b/src/server/db/migrations/0002_colossal_randall.sql deleted file mode 100644 index 854f0e95..00000000 --- a/src/server/db/migrations/0002_colossal_randall.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `card` ADD `deletedAt` timestamp;--> statement-breakpoint -ALTER TABLE `card` ADD `deletedBy` varchar(256); \ No newline at end of file diff --git a/src/server/db/migrations/0003_heavy_thanos.sql b/src/server/db/migrations/0003_heavy_thanos.sql deleted file mode 100644 index 260fdd2a..00000000 --- a/src/server/db/migrations/0003_heavy_thanos.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE `card_label` ( - `cardId` bigint NOT NULL, - `labelId` bigint NOT NULL -); ---> statement-breakpoint -CREATE TABLE `label` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `name` varchar(256) NOT NULL, - `colourCode` varchar(12), - `createdBy` varchar(256) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `updatedAt` timestamp ON UPDATE CURRENT_TIMESTAMP, - `boardId` bigint NOT NULL, - CONSTRAINT `label_id` PRIMARY KEY(`id`), - CONSTRAINT `label_publicId_unique` UNIQUE(`publicId`) -); ---> statement-breakpoint --- ALTER TABLE `card_label` ADD CONSTRAINT `card_label_cardId_card_id_fk` FOREIGN KEY (`cardId`) REFERENCES `card`(`id`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint --- ALTER TABLE `card_label` ADD CONSTRAINT `card_label_labelId_label_id_fk` FOREIGN KEY (`labelId`) REFERENCES `label`(`id`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/src/server/db/migrations/0004_tidy_lord_hawal.sql b/src/server/db/migrations/0004_tidy_lord_hawal.sql deleted file mode 100644 index 1f18ca12..00000000 --- a/src/server/db/migrations/0004_tidy_lord_hawal.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `card_label` ADD PRIMARY KEY(`cardId`,`labelId`); \ No newline at end of file diff --git a/src/server/db/migrations/0005_hard_colossus.sql b/src/server/db/migrations/0005_hard_colossus.sql deleted file mode 100644 index e8ab0416..00000000 --- a/src/server/db/migrations/0005_hard_colossus.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `list` ADD `deletedAt` timestamp;--> statement-breakpoint -ALTER TABLE `list` ADD `deletedBy` varchar(256); \ No newline at end of file diff --git a/src/server/db/migrations/0006_lame_pepper_potts.sql b/src/server/db/migrations/0006_lame_pepper_potts.sql deleted file mode 100644 index a3b93dbf..00000000 --- a/src/server/db/migrations/0006_lame_pepper_potts.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `board` ADD `deletedAt` timestamp;--> statement-breakpoint -ALTER TABLE `board` ADD `deletedBy` varchar(256); \ No newline at end of file diff --git a/src/server/db/migrations/0007_open_nuke.sql b/src/server/db/migrations/0007_open_nuke.sql deleted file mode 100644 index a1c433ba..00000000 --- a/src/server/db/migrations/0007_open_nuke.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE `import` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `source` enum('trello') NOT NULL, - `createdBy` varchar(255) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `status` enum('started','success','failed') NOT NULL, - CONSTRAINT `import_id` PRIMARY KEY(`id`), - CONSTRAINT `import_publicId_unique` UNIQUE(`publicId`) -); ---> statement-breakpoint -ALTER TABLE `board` ADD `importId` varchar(255);--> statement-breakpoint -ALTER TABLE `card` ADD `importId` varchar(255);--> statement-breakpoint -ALTER TABLE `label` ADD `importId` varchar(255);--> statement-breakpoint -ALTER TABLE `list` ADD `importId` varchar(255); \ No newline at end of file diff --git a/src/server/db/migrations/0008_modern_night_thrasher.sql b/src/server/db/migrations/0008_modern_night_thrasher.sql deleted file mode 100644 index c784c28a..00000000 --- a/src/server/db/migrations/0008_modern_night_thrasher.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `workspace` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `name` varchar(256) NOT NULL, - `slug` varchar(256) NOT NULL, - `createdBy` varchar(256) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `updatedAt` timestamp ON UPDATE CURRENT_TIMESTAMP, - `deletedAt` timestamp, - `deletedBy` varchar(256), - CONSTRAINT `workspace_id` PRIMARY KEY(`id`), - CONSTRAINT `workspace_publicId_unique` UNIQUE(`publicId`) -); ---> statement-breakpoint -ALTER TABLE `board` MODIFY COLUMN `importId` varchar(256);--> statement-breakpoint -ALTER TABLE `board` ADD `workspaceId` varchar(256); \ No newline at end of file diff --git a/src/server/db/migrations/0009_massive_peter_parker.sql b/src/server/db/migrations/0009_massive_peter_parker.sql deleted file mode 100644 index 7693e459..00000000 --- a/src/server/db/migrations/0009_massive_peter_parker.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `workspace` ADD CONSTRAINT `workspace_slug_unique` UNIQUE(`slug`); \ No newline at end of file diff --git a/src/server/db/migrations/0010_jittery_zzzax.sql b/src/server/db/migrations/0010_jittery_zzzax.sql deleted file mode 100644 index 10befc6a..00000000 --- a/src/server/db/migrations/0010_jittery_zzzax.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `workspace_members` ( - `id` bigint AUTO_INCREMENT NOT NULL, - `publicId` varchar(12) NOT NULL, - `userId` varchar(256) NOT NULL, - `workspaceId` bigint NOT NULL, - `createdBy` varchar(256) NOT NULL, - `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `updatedAt` timestamp ON UPDATE CURRENT_TIMESTAMP, - `deletedAt` timestamp, - `role` enum('admin','member','guest') NOT NULL, - CONSTRAINT `workspace_members_id` PRIMARY KEY(`id`), - CONSTRAINT `workspace_members_publicId_unique` UNIQUE(`publicId`) -); ---> statement-breakpoint --- ALTER TABLE `workspace_members` ADD CONSTRAINT `workspace_members_userId_user_id_fk` FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint --- ALTER TABLE `workspace_members` ADD CONSTRAINT `workspace_members_workspaceId_workspace_id_fk` FOREIGN KEY (`workspaceId`) REFERENCES `workspace`(`id`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/src/server/db/migrations/0011_familiar_aaron_stack.sql b/src/server/db/migrations/0011_familiar_aaron_stack.sql deleted file mode 100644 index d2da44c9..00000000 --- a/src/server/db/migrations/0011_familiar_aaron_stack.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `board` MODIFY COLUMN `workspaceId` bigint NOT NULL; \ No newline at end of file diff --git a/src/server/db/migrations/0012_powerful_gressill.sql b/src/server/db/migrations/0012_powerful_gressill.sql deleted file mode 100644 index 171cc933..00000000 --- a/src/server/db/migrations/0012_powerful_gressill.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE `card_workspace_members` ( - `cardId` bigint NOT NULL, - `workspaceMemberId` bigint NOT NULL, - CONSTRAINT `card_workspace_members_cardId_workspaceMemberId` PRIMARY KEY(`cardId`,`workspaceMemberId`) -); ---> statement-breakpoint --- ALTER TABLE `card_workspace_members` ADD CONSTRAINT `card_workspace_members_cardId_card_id_fk` FOREIGN KEY (`cardId`) REFERENCES `card`(`id`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint --- ALTER TABLE `card_workspace_members` ADD CONSTRAINT `card_workspace_members_workspaceMemberId_workspace_members_id_fk` FOREIGN KEY (`workspaceMemberId`) REFERENCES `workspace_members`(`id`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/src/server/db/migrations/meta/0000_snapshot.json b/src/server/db/migrations/meta/0000_snapshot.json index a26bbca6..1a00cb58 100644 --- a/src/server/db/migrations/meta/0000_snapshot.json +++ b/src/server/db/migrations/meta/0000_snapshot.json @@ -1,100 +1,96 @@ { "version": "5", - "dialect": "mysql", - "id": "f4bbbfaf-8b0d-40fd-9414-9e783f1a8197", + "dialect": "pg", + "id": "32295e0d-123f-4eae-b323-1fe55e3c4dca", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "account": { "name": "account", + "schema": "", "columns": { "userId": { "name": "userId", - "type": "varchar(255)", + "type": "uuid", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "type": { "name": "type", "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "provider": { "name": "provider", "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "providerAccountId": { "name": "providerAccountId", "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "refresh_token": { "name": "refresh_token", "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "access_token": { "name": "access_token", "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "expires_at": { "name": "expires_at", - "type": "int", + "type": "integer", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "token_type": { "name": "token_type", "type": "varchar(255)", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "scope": { "name": "scope", "type": "varchar(255)", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "id_token": { "name": "id_token", "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "session_state": { "name": "session_state", "type": "varchar(255)", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false } }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ + "indexes": {}, + "foreignKeys": { + "account_userId_user_id_fk": { + "name": "account_userId_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": [ "userId" ], - "isUnique": false + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, - "foreignKeys": {}, "compositePrimaryKeys": { "account_provider_providerAccountId": { "name": "account_provider_providerAccountId", @@ -108,352 +104,799 @@ }, "board": { "name": "board", + "schema": "", "columns": { "id": { "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true + "type": "bigserial", + "primaryKey": true, + "notNull": true }, "publicId": { "name": "publicId", "type": "varchar(12)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": true }, "createdBy": { "name": "createdBy", - "type": "varchar(255)", + "type": "uuid", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" + "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, + "notNull": false + }, + "deletedAt": { + "name": "deletedAt", + "type": "timestamp", + "primaryKey": false, "notNull": false, - "autoincrement": false, - "onUpdate": true + "default": "now()" + }, + "deletedBy": { + "name": "deletedBy", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "importId": { + "name": "importId", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "workspaceId": { + "name": "workspaceId", + "type": "bigint", + "primaryKey": false, + "notNull": true } }, "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ + "foreignKeys": { + "board_createdBy_user_id_fk": { + "name": "board_createdBy_user_id_fk", + "tableFrom": "board", + "tableTo": "user", + "columnsFrom": [ + "createdBy" + ], + "columnsTo": [ "id" - ] + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "board_deletedBy_user_id_fk": { + "name": "board_deletedBy_user_id_fk", + "tableFrom": "board", + "tableTo": "user", + "columnsFrom": [ + "deletedBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "board_importId_import_id_fk": { + "name": "board_importId_import_id_fk", + "tableFrom": "board", + "tableTo": "import", + "columnsFrom": [ + "importId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "board_workspaceId_workspace_id_fk": { + "name": "board_workspaceId_workspace_id_fk", + "tableFrom": "board", + "tableTo": "workspace", + "columnsFrom": [ + "workspaceId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, + "compositePrimaryKeys": {}, "uniqueConstraints": { "board_publicId_unique": { "name": "board_publicId_unique", + "nullsNotDistinct": false, "columns": [ "publicId" ] } } }, + "_card_workspace_members": { + "name": "_card_workspace_members", + "schema": "", + "columns": { + "cardId": { + "name": "cardId", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "workspaceMemberId": { + "name": "workspaceMemberId", + "type": "bigint", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "_card_workspace_members_cardId_card_id_fk": { + "name": "_card_workspace_members_cardId_card_id_fk", + "tableFrom": "_card_workspace_members", + "tableTo": "card", + "columnsFrom": [ + "cardId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "_card_workspace_members_workspaceMemberId_workspace_members_id_fk": { + "name": "_card_workspace_members_workspaceMemberId_workspace_members_id_fk", + "tableFrom": "_card_workspace_members", + "tableTo": "workspace_members", + "columnsFrom": [ + "workspaceMemberId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "_card_workspace_members_cardId_workspaceMemberId": { + "name": "_card_workspace_members_cardId_workspaceMemberId", + "columns": [ + "cardId", + "workspaceMemberId" + ] + } + }, + "uniqueConstraints": {} + }, "card": { "name": "card", + "schema": "", "columns": { "id": { "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true + "type": "bigserial", + "primaryKey": true, + "notNull": true }, "publicId": { "name": "publicId", "type": "varchar(12)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "title": { "name": "title", - "type": "varchar(256)", + "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "description": { "name": "description", - "type": "varchar(256)", + "type": "text", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false + }, + "index": { + "name": "index", + "type": "integer", + "primaryKey": false, + "notNull": true }, "createdBy": { "name": "createdBy", - "type": "varchar(256)", + "type": "uuid", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" + "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true + "notNull": false + }, + "deletedAt": { + "name": "deletedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deletedBy": { + "name": "deletedBy", + "type": "uuid", + "primaryKey": false, + "notNull": false }, "listId": { "name": "listId", "type": "bigint", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, - "index": { - "name": "index", - "type": "int", + "importId": { + "name": "importId", + "type": "bigint", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": false } }, "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ + "foreignKeys": { + "card_createdBy_user_id_fk": { + "name": "card_createdBy_user_id_fk", + "tableFrom": "card", + "tableTo": "user", + "columnsFrom": [ + "createdBy" + ], + "columnsTo": [ "id" - ] + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "card_deletedBy_user_id_fk": { + "name": "card_deletedBy_user_id_fk", + "tableFrom": "card", + "tableTo": "user", + "columnsFrom": [ + "deletedBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "card_listId_list_id_fk": { + "name": "card_listId_list_id_fk", + "tableFrom": "card", + "tableTo": "list", + "columnsFrom": [ + "listId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "card_importId_import_id_fk": { + "name": "card_importId_import_id_fk", + "tableFrom": "card", + "tableTo": "import", + "columnsFrom": [ + "importId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, + "compositePrimaryKeys": {}, "uniqueConstraints": { "card_publicId_unique": { "name": "card_publicId_unique", + "nullsNotDistinct": false, "columns": [ "publicId" ] + } + } + }, + "_card_labels": { + "name": "_card_labels", + "schema": "", + "columns": { + "cardId": { + "name": "cardId", + "type": "bigint", + "primaryKey": false, + "notNull": true }, - "card_listId_index_unique": { - "name": "card_listId_index_unique", + "labelId": { + "name": "labelId", + "type": "bigint", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "_card_labels_cardId_card_id_fk": { + "name": "_card_labels_cardId_card_id_fk", + "tableFrom": "_card_labels", + "tableTo": "card", + "columnsFrom": [ + "cardId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "_card_labels_labelId_label_id_fk": { + "name": "_card_labels_labelId_label_id_fk", + "tableFrom": "_card_labels", + "tableTo": "label", + "columnsFrom": [ + "labelId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "_card_labels_cardId_labelId": { + "name": "_card_labels_cardId_labelId", "columns": [ - "listId", - "index" + "cardId", + "labelId" + ] + } + }, + "uniqueConstraints": {} + }, + "import": { + "name": "import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigserial", + "primaryKey": true, + "notNull": true + }, + "publicId": { + "name": "publicId", + "type": "varchar(12)", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "source", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "status", + "primaryKey": false, + "notNull": true + }, + "createdBy": { + "name": "createdBy", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "import_createdBy_user_id_fk": { + "name": "import_createdBy_user_id_fk", + "tableFrom": "import", + "tableTo": "user", + "columnsFrom": [ + "createdBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "import_publicId_unique": { + "name": "import_publicId_unique", + "nullsNotDistinct": false, + "columns": [ + "publicId" + ] + } + } + }, + "label": { + "name": "label", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigserial", + "primaryKey": true, + "notNull": true + }, + "publicId": { + "name": "publicId", + "type": "varchar(12)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "colourCode": { + "name": "colourCode", + "type": "varchar(12)", + "primaryKey": false, + "notNull": false + }, + "createdBy": { + "name": "createdBy", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boardId": { + "name": "boardId", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "importId": { + "name": "importId", + "type": "bigint", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "label_createdBy_user_id_fk": { + "name": "label_createdBy_user_id_fk", + "tableFrom": "label", + "tableTo": "user", + "columnsFrom": [ + "createdBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "label_boardId_board_id_fk": { + "name": "label_boardId_board_id_fk", + "tableFrom": "label", + "tableTo": "board", + "columnsFrom": [ + "boardId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "label_importId_import_id_fk": { + "name": "label_importId_import_id_fk", + "tableFrom": "label", + "tableTo": "import", + "columnsFrom": [ + "importId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "label_publicId_unique": { + "name": "label_publicId_unique", + "nullsNotDistinct": false, + "columns": [ + "publicId" ] } } }, "list": { "name": "list", + "schema": "", "columns": { "id": { "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true + "type": "bigserial", + "primaryKey": true, + "notNull": true }, "publicId": { "name": "publicId", "type": "varchar(12)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "name": { "name": "name", - "type": "varchar(256)", + "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true + }, + "index": { + "name": "index", + "type": "integer", + "primaryKey": false, + "notNull": true }, "createdBy": { "name": "createdBy", - "type": "varchar(256)", + "type": "uuid", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" + "default": "now()" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true + "notNull": false + }, + "deletedAt": { + "name": "deletedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deletedBy": { + "name": "deletedBy", + "type": "uuid", + "primaryKey": false, + "notNull": false }, "boardId": { "name": "boardId", "type": "bigint", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, - "index": { - "name": "index", - "type": "int", + "importId": { + "name": "importId", + "type": "bigint", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": false } }, "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ + "foreignKeys": { + "list_createdBy_user_id_fk": { + "name": "list_createdBy_user_id_fk", + "tableFrom": "list", + "tableTo": "user", + "columnsFrom": [ + "createdBy" + ], + "columnsTo": [ "id" - ] + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "list_deletedBy_user_id_fk": { + "name": "list_deletedBy_user_id_fk", + "tableFrom": "list", + "tableTo": "user", + "columnsFrom": [ + "deletedBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "list_boardId_board_id_fk": { + "name": "list_boardId_board_id_fk", + "tableFrom": "list", + "tableTo": "board", + "columnsFrom": [ + "boardId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "list_importId_import_id_fk": { + "name": "list_importId_import_id_fk", + "tableFrom": "list", + "tableTo": "import", + "columnsFrom": [ + "importId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, + "compositePrimaryKeys": {}, "uniqueConstraints": { "list_publicId_unique": { "name": "list_publicId_unique", + "nullsNotDistinct": false, "columns": [ "publicId" ] - }, - "list_boardId_index_unique": { - "name": "list_boardId_index_unique", - "columns": [ - "boardId", - "index" - ] } } }, "session": { "name": "session", + "schema": "", "columns": { "sessionToken": { "name": "sessionToken", "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false + "primaryKey": true, + "notNull": true }, "userId": { "name": "userId", - "type": "varchar(255)", + "type": "uuid", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "expires": { "name": "expires", "type": "timestamp", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true } }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ + "indexes": {}, + "foreignKeys": { + "session_userId_user_id_fk": { + "name": "session_userId_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": [ "userId" ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, + "compositePrimaryKeys": {}, "uniqueConstraints": {} }, "user": { "name": "user", + "schema": "", "columns": { "id": { "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false + "type": "uuid", + "primaryKey": true, + "notNull": true }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false }, "email": { "name": "email", "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "emailVerified": { "name": "emailVerified", - "type": "timestamp(3)", + "type": "timestamp", "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" + "notNull": false }, "image": { "name": "image", "type": "varchar(255)", "primaryKey": false, - "notNull": false, - "autoincrement": false + "notNull": false } }, "indexes": {}, "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, + "compositePrimaryKeys": {}, "uniqueConstraints": { "user_email_unique": { "name": "user_email_unique", + "nullsNotDistinct": false, "columns": [ "email" ] @@ -462,27 +905,25 @@ }, "verificationToken": { "name": "verificationToken", + "schema": "", "columns": { "identifier": { "name": "identifier", "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "token": { "name": "token", "type": "varchar(255)", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true }, "expires": { "name": "expires", "type": "timestamp", "primaryKey": false, - "notNull": true, - "autoincrement": false + "notNull": true } }, "indexes": {}, @@ -497,6 +938,237 @@ } }, "uniqueConstraints": {} + }, + "workspace_members": { + "name": "workspace_members", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigserial", + "primaryKey": true, + "notNull": true + }, + "publicId": { + "name": "publicId", + "type": "varchar(12)", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "workspaceId": { + "name": "workspaceId", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "createdBy": { + "name": "createdBy", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deletedAt": { + "name": "deletedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "role", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_members_userId_user_id_fk": { + "name": "workspace_members_userId_user_id_fk", + "tableFrom": "workspace_members", + "tableTo": "user", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_members_workspaceId_workspace_id_fk": { + "name": "workspace_members_workspaceId_workspace_id_fk", + "tableFrom": "workspace_members", + "tableTo": "workspace", + "columnsFrom": [ + "workspaceId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_members_publicId_unique": { + "name": "workspace_members_publicId_unique", + "nullsNotDistinct": false, + "columns": [ + "publicId" + ] + } + } + }, + "workspace": { + "name": "workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigserial", + "primaryKey": true, + "notNull": true + }, + "publicId": { + "name": "publicId", + "type": "varchar(12)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "createdBy": { + "name": "createdBy", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deletedAt": { + "name": "deletedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deletedBy": { + "name": "deletedBy", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_createdBy_user_id_fk": { + "name": "workspace_createdBy_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": [ + "createdBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_deletedBy_user_id_fk": { + "name": "workspace_deletedBy_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": [ + "deletedBy" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_publicId_unique": { + "name": "workspace_publicId_unique", + "nullsNotDistinct": false, + "columns": [ + "publicId" + ] + }, + "workspace_slug_unique": { + "name": "workspace_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + } + } + }, + "enums": { + "source": { + "name": "source", + "values": { + "trello": "trello" + } + }, + "status": { + "name": "status", + "values": { + "started": "started", + "success": "success", + "failed": "failed" + } + }, + "role": { + "name": "role", + "values": { + "admin": "admin", + "member": "member", + "guest": "guest" + } } }, "schemas": {}, diff --git a/src/server/db/migrations/meta/0001_snapshot.json b/src/server/db/migrations/meta/0001_snapshot.json deleted file mode 100644 index e7274387..00000000 --- a/src/server/db/migrations/meta/0001_snapshot.json +++ /dev/null @@ -1,494 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "ab7d0b22-efdc-45b3-92cb-86bb630debe8", - "prevId": "f4bbbfaf-8b0d-40fd-9414-9e783f1a8197", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0002_snapshot.json b/src/server/db/migrations/meta/0002_snapshot.json deleted file mode 100644 index 57804329..00000000 --- a/src/server/db/migrations/meta/0002_snapshot.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "a623c303-6c0b-416d-aa46-2c0a9e2328cd", - "prevId": "ab7d0b22-efdc-45b3-92cb-86bb630debe8", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0003_snapshot.json b/src/server/db/migrations/meta/0003_snapshot.json deleted file mode 100644 index 4e5cf114..00000000 --- a/src/server/db/migrations/meta/0003_snapshot.json +++ /dev/null @@ -1,639 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "cb5d6d0a-3ad3-45b1-81a4-02844b130ebf", - "prevId": "a623c303-6c0b-416d-aa46-2c0a9e2328cd", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0004_snapshot.json b/src/server/db/migrations/meta/0004_snapshot.json deleted file mode 100644 index c6bf79e8..00000000 --- a/src/server/db/migrations/meta/0004_snapshot.json +++ /dev/null @@ -1,647 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "52bf8e38-66ad-4bb6-9924-798177dbd1b5", - "prevId": "cb5d6d0a-3ad3-45b1-81a4-02844b130ebf", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0005_snapshot.json b/src/server/db/migrations/meta/0005_snapshot.json deleted file mode 100644 index c322eb5e..00000000 --- a/src/server/db/migrations/meta/0005_snapshot.json +++ /dev/null @@ -1,661 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "263f81b0-eac9-47a0-9d24-ed61d6dd6061", - "prevId": "52bf8e38-66ad-4bb6-9924-798177dbd1b5", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0006_snapshot.json b/src/server/db/migrations/meta/0006_snapshot.json deleted file mode 100644 index 62ab0bb1..00000000 --- a/src/server/db/migrations/meta/0006_snapshot.json +++ /dev/null @@ -1,675 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "dbc12511-6c1b-4580-b95b-eb8365a5b090", - "prevId": "263f81b0-eac9-47a0-9d24-ed61d6dd6061", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0007_snapshot.json b/src/server/db/migrations/meta/0007_snapshot.json deleted file mode 100644 index 0af23eca..00000000 --- a/src/server/db/migrations/meta/0007_snapshot.json +++ /dev/null @@ -1,769 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "c397ed55-04bb-4ae5-9847-fe359c267155", - "prevId": "dbc12511-6c1b-4580-b95b-eb8365a5b090", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "import": { - "name": "import", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "enum('trello')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "status": { - "name": "status", - "type": "enum('started','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "import_id": { - "name": "import_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "import_publicId_unique": { - "name": "import_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0008_snapshot.json b/src/server/db/migrations/meta/0008_snapshot.json deleted file mode 100644 index bf4f4ea8..00000000 --- a/src/server/db/migrations/meta/0008_snapshot.json +++ /dev/null @@ -1,864 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "031b9c9b-8928-4766-935c-3f4e7c8fec86", - "prevId": "c397ed55-04bb-4ae5-9847-fe359c267155", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "import": { - "name": "import", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "enum('trello')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "status": { - "name": "status", - "type": "enum('started','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "import_id": { - "name": "import_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "import_publicId_unique": { - "name": "import_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "workspace": { - "name": "workspace", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "workspace_id": { - "name": "workspace_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "workspace_publicId_unique": { - "name": "workspace_publicId_unique", - "columns": [ - "publicId" - ] - } - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0009_snapshot.json b/src/server/db/migrations/meta/0009_snapshot.json deleted file mode 100644 index e0c34bb7..00000000 --- a/src/server/db/migrations/meta/0009_snapshot.json +++ /dev/null @@ -1,870 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "29b7ae44-dce5-4353-ba56-ff398fa3e542", - "prevId": "031b9c9b-8928-4766-935c-3f4e7c8fec86", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "import": { - "name": "import", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "enum('trello')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "status": { - "name": "status", - "type": "enum('started','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "import_id": { - "name": "import_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "import_publicId_unique": { - "name": "import_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "workspace": { - "name": "workspace", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "workspace_id": { - "name": "workspace_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "workspace_publicId_unique": { - "name": "workspace_publicId_unique", - "columns": [ - "publicId" - ] - }, - "workspace_slug_unique": { - "name": "workspace_slug_unique", - "columns": [ - "slug" - ] - } - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0010_snapshot.json b/src/server/db/migrations/meta/0010_snapshot.json deleted file mode 100644 index 05e2c905..00000000 --- a/src/server/db/migrations/meta/0010_snapshot.json +++ /dev/null @@ -1,992 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "bb0a54cb-844f-4bf2-9cc8-0600d09cccdc", - "prevId": "29b7ae44-dce5-4353-ba56-ff398fa3e542", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "import": { - "name": "import", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "enum('trello')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "status": { - "name": "status", - "type": "enum('started','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "import_id": { - "name": "import_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "import_publicId_unique": { - "name": "import_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "workspace_members": { - "name": "workspace_members", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "enum('admin','member','guest')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "workspace_members_userId_user_id_fk": { - "name": "workspace_members_userId_user_id_fk", - "tableFrom": "workspace_members", - "tableTo": "user", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "workspace_members_workspaceId_workspace_id_fk": { - "name": "workspace_members_workspaceId_workspace_id_fk", - "tableFrom": "workspace_members", - "tableTo": "workspace", - "columnsFrom": [ - "workspaceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "workspace_members_id": { - "name": "workspace_members_id", - "columns": [ - "id" - ] - }, - "workspace_members_userId_workspaceId": { - "name": "workspace_members_userId_workspaceId", - "columns": [ - "userId", - "workspaceId" - ] - } - }, - "uniqueConstraints": { - "workspace_members_publicId_unique": { - "name": "workspace_members_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "workspace": { - "name": "workspace", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "workspace_id": { - "name": "workspace_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "workspace_publicId_unique": { - "name": "workspace_publicId_unique", - "columns": [ - "publicId" - ] - }, - "workspace_slug_unique": { - "name": "workspace_slug_unique", - "columns": [ - "slug" - ] - } - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0011_snapshot.json b/src/server/db/migrations/meta/0011_snapshot.json deleted file mode 100644 index d7fd5a3a..00000000 --- a/src/server/db/migrations/meta/0011_snapshot.json +++ /dev/null @@ -1,992 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "7bcd995d-4e82-449d-9300-67bed38ec8e8", - "prevId": "bb0a54cb-844f-4bf2-9cc8-0600d09cccdc", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "import": { - "name": "import", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "enum('trello')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "status": { - "name": "status", - "type": "enum('started','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "import_id": { - "name": "import_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "import_publicId_unique": { - "name": "import_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "workspace_members": { - "name": "workspace_members", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "enum('admin','member','guest')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "workspace_members_userId_user_id_fk": { - "name": "workspace_members_userId_user_id_fk", - "tableFrom": "workspace_members", - "tableTo": "user", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "workspace_members_workspaceId_workspace_id_fk": { - "name": "workspace_members_workspaceId_workspace_id_fk", - "tableFrom": "workspace_members", - "tableTo": "workspace", - "columnsFrom": [ - "workspaceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "workspace_members_id": { - "name": "workspace_members_id", - "columns": [ - "id" - ] - }, - "workspace_members_userId_workspaceId": { - "name": "workspace_members_userId_workspaceId", - "columns": [ - "userId", - "workspaceId" - ] - } - }, - "uniqueConstraints": { - "workspace_members_publicId_unique": { - "name": "workspace_members_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "workspace": { - "name": "workspace", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "workspace_id": { - "name": "workspace_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "workspace_publicId_unique": { - "name": "workspace_publicId_unique", - "columns": [ - "publicId" - ] - }, - "workspace_slug_unique": { - "name": "workspace_slug_unique", - "columns": [ - "slug" - ] - } - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/0012_snapshot.json b/src/server/db/migrations/meta/0012_snapshot.json deleted file mode 100644 index dcd75f01..00000000 --- a/src/server/db/migrations/meta/0012_snapshot.json +++ /dev/null @@ -1,1050 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "2de69552-b0dc-4709-99fe-e17b97ce932d", - "prevId": "7bcd995d-4e82-449d-9300-67bed38ec8e8", - "tables": { - "account": { - "name": "account", - "columns": { - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "refresh_token": { - "name": "refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "int", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "token_type": { - "name": "token_type", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "scope": { - "name": "scope", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "session_state": { - "name": "session_state", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "account_provider_providerAccountId": { - "name": "account_provider_providerAccountId", - "columns": [ - "provider", - "providerAccountId" - ] - } - }, - "uniqueConstraints": {} - }, - "board": { - "name": "board", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "board_id": { - "name": "board_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "board_publicId_unique": { - "name": "board_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_workspace_members": { - "name": "card_workspace_members", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "workspaceMemberId": { - "name": "workspaceMemberId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_workspace_members_cardId_card_id_fk": { - "name": "card_workspace_members_cardId_card_id_fk", - "tableFrom": "card_workspace_members", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_workspace_members_workspaceMemberId_workspace_members_id_fk": { - "name": "card_workspace_members_workspaceMemberId_workspace_members_id_fk", - "tableFrom": "card_workspace_members", - "tableTo": "workspace_members", - "columnsFrom": [ - "workspaceMemberId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_workspace_members_cardId_workspaceMemberId": { - "name": "card_workspace_members_cardId_workspaceMemberId", - "columns": [ - "cardId", - "workspaceMemberId" - ] - } - }, - "uniqueConstraints": {} - }, - "card": { - "name": "card", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "title": { - "name": "title", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "listId": { - "name": "listId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "card_id": { - "name": "card_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "card_publicId_unique": { - "name": "card_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "card_label": { - "name": "card_label", - "columns": { - "cardId": { - "name": "cardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "labelId": { - "name": "labelId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "card_label_cardId_card_id_fk": { - "name": "card_label_cardId_card_id_fk", - "tableFrom": "card_label", - "tableTo": "card", - "columnsFrom": [ - "cardId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "card_label_labelId_label_id_fk": { - "name": "card_label_labelId_label_id_fk", - "tableFrom": "card_label", - "tableTo": "label", - "columnsFrom": [ - "labelId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "card_label_cardId_labelId": { - "name": "card_label_cardId_labelId", - "columns": [ - "cardId", - "labelId" - ] - } - }, - "uniqueConstraints": {} - }, - "import": { - "name": "import", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "source": { - "name": "source", - "type": "enum('trello')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "status": { - "name": "status", - "type": "enum('started','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "import_id": { - "name": "import_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "import_publicId_unique": { - "name": "import_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "label": { - "name": "label", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "colourCode": { - "name": "colourCode", - "type": "varchar(12)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "label_id": { - "name": "label_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "label_publicId_unique": { - "name": "label_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "list": { - "name": "list", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "boardId": { - "name": "boardId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "index": { - "name": "index", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "importId": { - "name": "importId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "list_id": { - "name": "list_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "list_publicId_unique": { - "name": "list_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "session": { - "name": "session", - "columns": { - "sessionToken": { - "name": "sessionToken", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "userId_idx": { - "name": "userId_idx", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "session_sessionToken": { - "name": "session_sessionToken", - "columns": [ - "sessionToken" - ] - } - }, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "emailVerified": { - "name": "emailVerified", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP(3)" - }, - "image": { - "name": "image", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_id": { - "name": "user_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "columns": [ - "email" - ] - } - } - }, - "verificationToken": { - "name": "verificationToken", - "columns": { - "identifier": { - "name": "identifier", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "verificationToken_identifier_token": { - "name": "verificationToken_identifier_token", - "columns": [ - "identifier", - "token" - ] - } - }, - "uniqueConstraints": {} - }, - "workspace_members": { - "name": "workspace_members", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "userId": { - "name": "userId", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "workspaceId": { - "name": "workspaceId", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "enum('admin','member','guest')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "workspace_members_userId_user_id_fk": { - "name": "workspace_members_userId_user_id_fk", - "tableFrom": "workspace_members", - "tableTo": "user", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "workspace_members_workspaceId_workspace_id_fk": { - "name": "workspace_members_workspaceId_workspace_id_fk", - "tableFrom": "workspace_members", - "tableTo": "workspace", - "columnsFrom": [ - "workspaceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "workspace_members_id": { - "name": "workspace_members_id", - "columns": [ - "id" - ] - }, - "workspace_members_userId_workspaceId": { - "name": "workspace_members_userId_workspaceId", - "columns": [ - "userId", - "workspaceId" - ] - } - }, - "uniqueConstraints": { - "workspace_members_publicId_unique": { - "name": "workspace_members_publicId_unique", - "columns": [ - "publicId" - ] - } - } - }, - "workspace": { - "name": "workspace", - "columns": { - "id": { - "name": "id", - "type": "bigint", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "onUpdate": true - }, - "deletedAt": { - "name": "deletedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "deletedBy": { - "name": "deletedBy", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "workspace_id": { - "name": "workspace_id", - "columns": [ - "id" - ] - } - }, - "uniqueConstraints": { - "workspace_publicId_unique": { - "name": "workspace_publicId_unique", - "columns": [ - "publicId" - ] - }, - "workspace_slug_unique": { - "name": "workspace_slug_unique", - "columns": [ - "slug" - ] - } - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/server/db/migrations/meta/_journal.json b/src/server/db/migrations/meta/_journal.json index 637c64b1..dc537b43 100644 --- a/src/server/db/migrations/meta/_journal.json +++ b/src/server/db/migrations/meta/_journal.json @@ -1,96 +1,12 @@ { - "version": "5", - "dialect": "mysql", + "version": "12", + "dialect": "pg", "entries": [ { "idx": 0, "version": "5", - "when": 1699896771081, - "tag": "0000_hesitant_nocturne", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1701122139821, - "tag": "0001_warm_jamie_braddock", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1702630369122, - "tag": "0002_colossal_randall", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1702750430064, - "tag": "0003_heavy_thanos", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1702924641678, - "tag": "0004_tidy_lord_hawal", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1704193352729, - "tag": "0005_hard_colossus", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1704196792662, - "tag": "0006_lame_pepper_potts", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1708882995081, - "tag": "0007_open_nuke", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1709314036638, - "tag": "0008_modern_night_thrasher", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1709314236852, - "tag": "0009_massive_peter_parker", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1709465628179, - "tag": "0010_jittery_zzzax", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1709542143845, - "tag": "0011_familiar_aaron_stack", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1709676468112, - "tag": "0012_powerful_gressill", + "when": 1711571659259, + "tag": "0000_legal_quicksilver", "breakpoints": true } ] diff --git a/src/server/db/schema.ts b/src/server/db/schema.ts index 03100bd4..d1459b7f 100644 --- a/src/server/db/schema.ts +++ b/src/server/db/schema.ts @@ -1,41 +1,36 @@ -import { relations, sql } from "drizzle-orm"; +import { relations } from "drizzle-orm"; import { - bigint, - index, - int, - mysqlEnum, - mysqlTableCreator, + integer, + bigserial, + uuid, + pgEnum, + pgTable, primaryKey, text, timestamp, varchar, -} from "drizzle-orm/mysql-core"; + bigint, +} from "drizzle-orm/pg-core"; import { type AdapterAccount } from "@auth/core/adapters"; -/** - * This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same - * database instance for multiple projects. - * - * @see https://orm.drizzle.team/docs/goodies#multi-project-schema - */ -export const mySqlTable = mysqlTableCreator((name) => `${name}`); +export const importSourceEnum = pgEnum('source', ['trello']); +export const importStatusEnum = pgEnum('status', ['started', 'success', 'failed']); +export const memberRoleEnum = pgEnum('role', ['admin', 'member', 'guest']); -export const boards = mySqlTable( +export const boards = pgTable( "board", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), name: varchar("name", { length: 255 }).notNull(), - createdBy: varchar("createdBy", { length: 255 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - updatedAt: timestamp("updatedAt").onUpdateNow(), - deletedAt: timestamp("deletedAt"), - deletedBy: varchar("deletedBy", { length: 256 }), - importId: varchar("importId", { length: 256 }), - workspaceId: bigint("workspaceId", { mode: "number" }).notNull(), + createdBy: uuid("createdBy").notNull().references(() => users.id), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt"), + deletedAt: timestamp("deletedAt").defaultNow(), + deletedBy: uuid("deletedBy").references(() => users.id), + importId: bigint("importId", { mode: "number" }).references(() => imports.id), + workspaceId: bigint("workspaceId", { mode: "number" }).notNull().references(() => workspaces.id), }, ); @@ -60,17 +55,15 @@ export const boardsRelations = relations(boards, ({ one, many }) => ({ }), })); -export const imports = mySqlTable( +export const imports = pgTable( "import", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), - source: mysqlEnum('source', ['trello']).notNull(), - createdBy: varchar("createdBy", { length: 255 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - status: mysqlEnum('status', ['started', 'success', 'failed']).notNull(), + source: importSourceEnum('source').notNull(), + status: importStatusEnum('status').notNull(), + createdBy: uuid("createdBy").notNull().references(() => users.id), + createdAt: timestamp("createdAt").defaultNow().notNull(), }, ); @@ -85,20 +78,18 @@ export const importsRelations = relations(imports, ({ one, many }) => ({ labels: many(labels) })); -export const labels = mySqlTable( +export const labels = pgTable( "label", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), - name: varchar("name", { length: 256 }).notNull(), + name: varchar("name", { length: 255 }).notNull(), colourCode: varchar("colourCode", { length: 12 }), - createdBy: varchar("createdBy", { length: 256 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - updatedAt: timestamp("updatedAt").onUpdateNow(), - boardId: bigint("boardId", { mode: "number" }).notNull(), - importId: varchar("importId", { length: 255 }), + createdBy: uuid("createdBy").notNull().references(() => users.id), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt"), + boardId: bigint("boardId", { mode: "number" }).notNull().references(() => boards.id), + importId: bigint("importId", { mode: "number" }).references(() => imports.id), } ); @@ -118,8 +109,8 @@ export const labelsRelations = relations(labels, ({ one, many }) => ({ }), })); -export const cardsToLabels = mySqlTable( - "card_label", +export const cardsToLabels = pgTable( + "_card_labels", { cardId: bigint("cardId", { mode: "number" }).notNull().references(() => cards.id), labelId: bigint("labelId", { mode: "number" }).notNull().references(() => labels.id), @@ -139,8 +130,8 @@ export const cardToLabelsRelations = relations(cardsToLabels, ({ one }) => ({ }), })); -export const cardToWorkspaceMembers = mySqlTable( - "card_workspace_members", +export const cardToWorkspaceMembers = pgTable( + "_card_workspace_members", { cardId: bigint("cardId", { mode: "number" }).notNull().references(() => cards.id), workspaceMemberId: bigint("workspaceMemberId", { mode: "number" }).notNull().references(() => workspaceMembers.id), @@ -160,22 +151,20 @@ export const cardToWorkspaceMembersRelations = relations(cardToWorkspaceMembers, }), })); -export const lists = mySqlTable( +export const lists = pgTable( "list", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), - name: varchar("name", { length: 256 }).notNull(), - createdBy: varchar("createdBy", { length: 256 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - updatedAt: timestamp("updatedAt").onUpdateNow(), - boardId: bigint("boardId", { mode: "number" }).notNull(), - index: int("index").notNull(), + name: varchar("name", { length: 255 }).notNull(), + index: integer("index").notNull(), + createdBy: uuid("createdBy").notNull().references(() => users.id), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt"), deletedAt: timestamp("deletedAt"), - deletedBy: varchar("deletedBy", { length: 256 }), - importId: varchar("importId", { length: 255 }), + deletedBy: uuid("deletedBy").references(() => users.id), + boardId: bigint("boardId", { mode: "number" }).notNull().references(() => boards.id), + importId: bigint("importId", { mode: "number" }).references(() => imports.id), } ); @@ -199,23 +188,21 @@ export const listsRelations = relations(lists, ({ one, many }) => ({ }), })); -export const cards = mySqlTable( +export const cards = pgTable( "card", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), - title: varchar("title", { length: 256 }).notNull(), + title: varchar("title", { length: 255 }).notNull(), description: text("description"), - createdBy: varchar("createdBy", { length: 256 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - updatedAt: timestamp("updatedAt").onUpdateNow(), - listId: bigint("listId", { mode: "number" }).notNull(), - index: int("index").notNull(), + index: integer("index").notNull(), + createdBy: uuid("createdBy").notNull().references(() => users.id), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt"), deletedAt: timestamp("deletedAt"), - deletedBy: varchar("deletedBy", { length: 256 }), - importId: varchar("importId", { length: 255 }), + deletedBy: uuid("deletedBy").references(() => users.id), + listId: bigint("listId", { mode: "number" }).notNull().references(() => lists.id), + importId: bigint("importId", { mode: "number" }).references(() => imports.id), } ); @@ -240,14 +227,11 @@ export const cardsRelations = relations(cards, ({ one, many }) => ({ }), })); -export const users = mySqlTable("user", { - id: varchar("id", { length: 255 }).notNull().primaryKey(), +export const users = pgTable("user", { + id: uuid("id").notNull().primaryKey(), name: varchar("name", { length: 255 }), email: varchar("email", { length: 255 }).notNull().unique(), - emailVerified: timestamp("emailVerified", { - mode: "date", - fsp: 3, - }).default(sql`CURRENT_TIMESTAMP(3)`), + emailVerified: timestamp("emailVerified", { mode: "date" }), image: varchar("image", { length: 255 }), }); @@ -260,10 +244,12 @@ export const usersRelations = relations(users, ({ many }) => ({ workspaces: many(workspaces), })); -export const accounts = mySqlTable( +export const accounts = pgTable( "account", { - userId: varchar("userId", { length: 255 }).notNull(), + userId: uuid("userId") + .notNull() + .references(() => users.id), type: varchar("type", { length: 255 }) .$type() .notNull(), @@ -271,7 +257,7 @@ export const accounts = mySqlTable( providerAccountId: varchar("providerAccountId", { length: 255 }).notNull(), refresh_token: text("refresh_token"), access_token: text("access_token"), - expires_at: int("expires_at"), + expires_at: integer("expires_at"), token_type: varchar("token_type", { length: 255 }), scope: varchar("scope", { length: 255 }), id_token: text("id_token"), @@ -279,7 +265,6 @@ export const accounts = mySqlTable( }, (account) => ({ compoundKey: primaryKey(account.provider, account.providerAccountId), - userIdIdx: index("userId_idx").on(account.userId), }) ); @@ -287,25 +272,22 @@ export const accountsRelations = relations(accounts, ({ one }) => ({ user: one(users, { fields: [accounts.userId], references: [users.id] }), })); -export const sessions = mySqlTable( +export const sessions = pgTable( "session", { sessionToken: varchar("sessionToken", { length: 255 }) .notNull() .primaryKey(), - userId: varchar("userId", { length: 255 }).notNull(), + userId: uuid("userId").notNull().references(() => users.id), expires: timestamp("expires", { mode: "date" }).notNull(), }, - (session) => ({ - userIdIdx: index("userId_idx").on(session.userId), - }) ); export const sessionsRelations = relations(sessions, ({ one }) => ({ user: one(users, { fields: [sessions.userId], references: [users.id] }), })); -export const verificationTokens = mySqlTable( +export const verificationTokens = pgTable( "verificationToken", { identifier: varchar("identifier", { length: 255 }).notNull(), @@ -317,20 +299,18 @@ export const verificationTokens = mySqlTable( }) ); -export const workspaces = mySqlTable( +export const workspaces = pgTable( "workspace", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), - name: varchar("name", { length: 256 }).notNull(), - slug: varchar("slug", { length: 256 }).notNull().unique(), - createdBy: varchar("createdBy", { length: 256 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - updatedAt: timestamp("updatedAt").onUpdateNow(), + name: varchar("name", { length: 255 }).notNull(), + slug: varchar("slug", { length: 255 }).notNull().unique(), + createdBy: uuid("createdBy").notNull().references(() => users.id), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt"), deletedAt: timestamp("deletedAt"), - deletedBy: varchar("deletedBy", { length: 256 }), + deletedBy: uuid("deletedBy").references(() => users.id), } ); @@ -339,23 +319,19 @@ export const workspaceRelations = relations(workspaces, ({ one, many }) => ({ members: many(workspaceMembers) })); -export const workspaceMembers = mySqlTable( +export const workspaceMembers = pgTable( "workspace_members", { - id: bigint("id", { mode: "number" }).primaryKey().autoincrement(), + id: bigserial("id", { mode: "number" }).primaryKey(), publicId: varchar("publicId", { length: 12 }).notNull().unique(), - userId: varchar("userId", { length: 256 }).notNull().references(() => users.id), + userId: uuid("userId").notNull().references(() => users.id), workspaceId: bigint("workspaceId", { mode: "number" }).notNull().references(() => workspaces.id), - createdBy: varchar("createdBy", { length: 256 }).notNull(), - createdAt: timestamp("createdAt") - .default(sql`CURRENT_TIMESTAMP`) - .notNull(), - updatedAt: timestamp("updatedAt").onUpdateNow(), + createdBy: uuid("createdBy").notNull(), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt"), deletedAt: timestamp("deletedAt"), - role: mysqlEnum('role', ['admin', 'member', 'guest']).notNull(), - }, (t) => ({ - pk: primaryKey(t.userId, t.workspaceId), - }), + role: memberRoleEnum('role').notNull(), + }, ); export const usersToWorkspacesRelations = relations(workspaceMembers, ({ one }) => ({