schema
This commit is contained in:
parent
355366a640
commit
029d149ae3
1 changed files with 3 additions and 12 deletions
|
@ -9,10 +9,7 @@ import { relations } from "drizzle-orm";
|
|||
|
||||
export const rooms = mysqlTable("Room", {
|
||||
id: varchar("id", { length: 255 }).notNull().primaryKey(),
|
||||
created_at: timestamp("created_at", {
|
||||
mode: "date",
|
||||
fsp: 3,
|
||||
}).defaultNow(),
|
||||
created_at: timestamp("created_at").defaultNow(),
|
||||
userId: varchar("userId", { length: 255 }).notNull(),
|
||||
roomName: varchar("roomName", { length: 255 }),
|
||||
storyName: varchar("storyName", { length: 255 }),
|
||||
|
@ -27,10 +24,7 @@ export const roomsRelations = relations(rooms, ({ many }) => ({
|
|||
|
||||
export const votes = mysqlTable("Vote", {
|
||||
id: varchar("id", { length: 255 }).notNull().primaryKey(),
|
||||
created_at: timestamp("created_at", {
|
||||
mode: "date",
|
||||
fsp: 3,
|
||||
}).defaultNow(),
|
||||
created_at: timestamp("created_at").defaultNow(),
|
||||
userId: varchar("userId", { length: 255 }).notNull(),
|
||||
roomId: varchar("roomId", { length: 255 }).notNull(),
|
||||
value: varchar("value", { length: 255 }).notNull(),
|
||||
|
@ -45,10 +39,7 @@ export const votesRelations = relations(votes, ({ one }) => ({
|
|||
|
||||
export const logs = mysqlTable("Log", {
|
||||
id: varchar("id", { length: 255 }).notNull().primaryKey(),
|
||||
created_at: timestamp("created_at", {
|
||||
mode: "date",
|
||||
fsp: 3,
|
||||
}).defaultNow(),
|
||||
created_at: timestamp("created_at").defaultNow(),
|
||||
userId: varchar("userId", { length: 255 }).notNull(),
|
||||
roomId: varchar("roomId", { length: 255 }).notNull(),
|
||||
scale: varchar("scale", { length: 255 }),
|
||||
|
|
Loading…
Add table
Reference in a new issue