From 1f263a46dbebec427d84a259b6ff705277c4592b Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Mon, 27 Mar 2023 16:03:46 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Drop=20authorName=20from=20polls?= =?UTF-8?q?=20table=20(#616)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/server/routers/polls.ts | 1 - apps/web/src/server/routers/polls/demo.ts | 1 - .../20230327105647_remove_author_name/migration.sql | 8 ++++++++ packages/database/prisma/schema.prisma | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 packages/database/prisma/migrations/20230327105647_remove_author_name/migration.sql diff --git a/apps/web/src/server/routers/polls.ts b/apps/web/src/server/routers/polls.ts index 40640f306..24fec8b4e 100644 --- a/apps/web/src/server/routers/polls.ts +++ b/apps/web/src/server/routers/polls.ts @@ -124,7 +124,6 @@ export const polls = router({ timeZone: input.timeZone, location: input.location, description: input.description, - authorName: input.user?.name, demo: input.demo, adminUrlId, participantUrlId, diff --git a/apps/web/src/server/routers/polls/demo.ts b/apps/web/src/server/routers/polls/demo.ts index 08564878a..87dc81813 100644 --- a/apps/web/src/server/routers/polls/demo.ts +++ b/apps/web/src/server/routers/polls/demo.ts @@ -77,7 +77,6 @@ export const demo = router({ type: "date", location: "Starbucks, 901 New York Avenue", description: `Hey everyone, please choose the dates when you are available to meet for our monthly get together. Looking forward to see you all!`, - authorName: "Johnny", demo: true, adminUrlId, participantUrlId: await nanoid(), diff --git a/packages/database/prisma/migrations/20230327105647_remove_author_name/migration.sql b/packages/database/prisma/migrations/20230327105647_remove_author_name/migration.sql new file mode 100644 index 000000000..9cbfc33f4 --- /dev/null +++ b/packages/database/prisma/migrations/20230327105647_remove_author_name/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - You are about to drop the column `author_name` on the `polls` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE "polls" DROP COLUMN "author_name"; diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index d085bc9f4..c0426d29c 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -44,7 +44,6 @@ model Poll { options Option[] participants Participant[] watchers Watcher[] - authorName String? @map("author_name") demo Boolean @default(false) comments Comment[] legacy Boolean @default(false)