export const circuitTable = sqliteTable('circuit', {
id: text('id').notNull().primaryKey(),
name: text('name').notNull(),
placeName: text('place_name').notNull(),
countryId: text('country_id')
.notNull()
.references(() => countryTable.id),
});
export const circuitRelations = relations(circuitTable, ({ one }) => ({
country: one(countryTable, {
fields: [circuitTable.countryId],
references: [countryTable.id],
}),
}));
export const circuitTable = sqliteTable('circuit', {
id: text('id').notNull().primaryKey(),
name: text('name').notNull(),
placeName: text('place_name').notNull(),
countryId: text('country_id')
.notNull()
.references(() => countryTable.id),
});
export const circuitRelations = relations(circuitTable, ({ one }) => ({
country: one(countryTable, {
fields: [circuitTable.countryId],
references: [countryTable.id],
}),
}));