const moves = pgTable(
"moves",
{
gameID: varchar("game_id")
.notNull()
.references(() => games.id, { onDelete: "cascade" }),
turn: integer("turn").notNull().unique(), },
(table) => {
return {
pk: primaryKey({ name: "id", columns: [table.gameID, table.turn] }),
};
},
);
const moves = pgTable(
"moves",
{
gameID: varchar("game_id")
.notNull()
.references(() => games.id, { onDelete: "cascade" }),
turn: integer("turn").notNull().unique(), },
(table) => {
return {
pk: primaryKey({ name: "id", columns: [table.gameID, table.turn] }),
};
},
);