feat: add migration for 'zaps_amount' column
This commit is contained in:
parent
6024586b19
commit
1f4de9aed0
|
@ -0,0 +1,12 @@
|
||||||
|
import { Kysely } from 'kysely';
|
||||||
|
|
||||||
|
export async function up(db: Kysely<any>): Promise<void> {
|
||||||
|
await db.schema
|
||||||
|
.alterTable('event_stats')
|
||||||
|
.addColumn('zaps_amount', 'integer', (col) => col.notNull().defaultTo(0))
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(db: Kysely<any>): Promise<void> {
|
||||||
|
await db.schema.alterTable('event_stats').dropColumn('zaps_amount').execute();
|
||||||
|
}
|
Loading…
Reference in New Issue