feat: setup init migration

This commit is contained in:
Henry
2023-11-13 23:37:40 +00:00
parent 3742b68ede
commit 7f2ca58679
8 changed files with 612 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ export const lists = mySqlTable(
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt").onUpdateNow(),
boardId: varchar("boardId", { length: 256 }).notNull(),
boardId: bigint("boardId", { mode: "number" }).notNull(),
index: int("index").notNull()
}, (t) => ({
unq: unique().on(t.boardId, t.index),
@@ -84,7 +84,7 @@ export const cards = mySqlTable(
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt").onUpdateNow(),
listId: varchar("listId", { length: 256 }).notNull(),
listId: bigint("listId", { mode: "number" }).notNull(),
index: int("index").notNull()
}, (t) => ({
unq: unique().on(t.listId, t.index),