ditto/packages/db/migrations/024_event_stats_quotes_count.ts
2025-02-16 00:14:41 -06:00

12 lines
398 B
TypeScript

import type { Kysely } from 'kysely';
export async function up(db: Kysely<unknown>): Promise<void> {
await db.schema
.alterTable('event_stats')
.addColumn('quotes_count', 'integer', (col) => col.notNull().defaultTo(0))
.execute();
}
export async function down(db: Kysely<unknown>): Promise<void> {
await db.schema.alterTable('event_stats').dropColumn('quotes_count').execute();
}