| 1 | import { defineRelations } from "drizzle-orm"; |
| 2 | import { bigint, mysqlTable, varchar } from "drizzle-orm/mysql-core"; |
| 3 | |
| 4 | // Mirrors migrations/0001_create_widgets.sql, which the branch applies on |
| 5 | // deploy via `migrationsDir`. |
| 6 | export const Widgets = mysqlTable("alchemy_mysql_widgets", { |
| 7 | id: bigint("id", { mode: "number" }).primaryKey(), |
| 8 | name: varchar("name", { length: 255 }).notNull(), |
| 9 | }); |
| 10 | export type Widget = typeof Widgets.$inferSelect; |
| 11 | |
| 12 | export const relations = defineRelations({ Widgets }, () => ({})); |