ability to create trials added; form uploader cleaned up

This commit is contained in:
2024-10-03 16:35:19 -04:00
parent 93e2b0323b
commit 7ef9180026
19 changed files with 559 additions and 151 deletions

View File

@@ -89,4 +89,24 @@ export const users = pgTable(
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
}
);
export const trials = pgTable(
"trial",
{
id: serial("id").primaryKey(),
title: varchar("title", { length: 256 }).notNull(),
createdAt: timestamp("created_at", { withTimezone: true })
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
}
);
export const trialParticipants = pgTable(
"trial_participants",
{
id: serial("id").primaryKey(),
trialId: integer("trial_id").references(() => trials.id).notNull(),
participantId: integer("participant_id").references(() => participants.id).notNull(),
}
);