Skip to content

Commit ab3a031

Browse files
committed
refactor(schema): remove sortOrder field from formQuestions and clean up forms
1 parent cd42733 commit ab3a031

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

lib/db/schema.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ export const formQuestions = pgTable("form_questions", {
223223
formId: uuid("form_id")
224224
.references(() => forms.id, { onDelete: "cascade" })
225225
.notNull(),
226-
sortOrder: integer("sort_order").notNull(),
227226
type: formQuestionTypeEnum("type").notNull(),
228227
prompt: text("prompt").notNull(),
229228
options: jsonb("options").$type<FormQuestionOption[]>(),
@@ -244,10 +243,3 @@ export const formQuestionAnswers = pgTable("form_question_answers", {
244243
createdAt: timestamp("created_at").defaultNow().notNull(),
245244
updatedAt: timestamp("updated_at").defaultNow().notNull(),
246245
});
247-
248-
export const forms = pgTable("forms", {
249-
id: uuid("id").primaryKey().defaultRandom(),
250-
name: text("name").notNull(),
251-
createdAt: timestamp("created_at").defaultNow().notNull(),
252-
updatedAt: timestamp("updated_at").defaultNow().notNull(),
253-
});

0 commit comments

Comments
 (0)