Drop deleted_at column
This commit is contained in:
parent
137bd0dae0
commit
171350a34d
|
@ -30,7 +30,6 @@ interface EventRow {
|
|||
created_at: number;
|
||||
tags: string;
|
||||
sig: string;
|
||||
deleted_at: number | null;
|
||||
}
|
||||
|
||||
interface EventFTSRow {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { Kysely } from 'kysely';
|
||||
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
await db.deleteFrom('nostr_events').where('deleted_at', 'is not', 'null').execute();
|
||||
await db.schema.alterTable('nostr_events').dropColumn('deleted_at').execute();
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await db.schema.alterTable('nostr_events').addColumn('deleted_at', 'integer').execute();
|
||||
}
|
Loading…
Reference in New Issue