From 9308a173a51e4fe722457d11d02f1aa938e3948a Mon Sep 17 00:00:00 2001 From: Fikri <108330221+percyfikri@users.noreply.github.com> Date: Tue, 6 Aug 2024 09:12:15 +0700 Subject: [PATCH] update: move the fk column below id question --- apps/backend/src/drizzle/schema/questions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/backend/src/drizzle/schema/questions.ts b/apps/backend/src/drizzle/schema/questions.ts index 3bc582d..a84ba99 100644 --- a/apps/backend/src/drizzle/schema/questions.ts +++ b/apps/backend/src/drizzle/schema/questions.ts @@ -12,10 +12,10 @@ export const questions = pgTable("questions", { id: varchar("id", { length: 50 }) .primaryKey() .$defaultFn(() => createId()), + subAspectId: varchar("subAspectId").references(() => subAspects.id), question: text("question"), needFile: boolean("needFile").default(false), createdAt: timestamp("createdAt", { mode: "date" }).defaultNow(), updatedAt: timestamp("updatedAt", { mode: "date" }).defaultNow(), deletedAt: timestamp("deletedAt", { mode: "date" }), - subAspectId: varchar("subAspectId").references(() => subAspects.id), -}); \ No newline at end of file +});