import { index, int, mysqlTable, serial, varchar } from 'drizzle-orm/mysql-core/index.js';
export const systems = mysqlTable('systems', {
id: serial('id').primaryKey(),
name: varchar('name', { length: 256 }).notNull(),
});
export const stars = mysqlTable(
'stars',
{
id: serial('id').primaryKey(),
system_id: int('system_id').notNull(),
name: varchar('name', { length: 256 }).notNull(),
},
table => ({
systemIdIdx: index('system_id_idx').on(table.system_id),
}),
);
import { index, int, mysqlTable, serial, varchar } from 'drizzle-orm/mysql-core/index.js';
export const systems = mysqlTable('systems', {
id: serial('id').primaryKey(),
name: varchar('name', { length: 256 }).notNull(),
});
export const stars = mysqlTable(
'stars',
{
id: serial('id').primaryKey(),
system_id: int('system_id').notNull(),
name: varchar('name', { length: 256 }).notNull(),
},
table => ({
systemIdIdx: index('system_id_idx').on(table.system_id),
}),
);