mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
14 lines
443 B
TypeScript
14 lines
443 B
TypeScript
import { Kysely } from 'kysely';
|
|
|
|
export async function up(db: Kysely<any>): Promise<void> {
|
|
await db.schema.dropTable('relays').execute();
|
|
}
|
|
|
|
export async function down(db: Kysely<any>): Promise<void> {
|
|
await db.schema
|
|
.createTable('relays')
|
|
.addColumn('url', 'text', (col) => col.primaryKey())
|
|
.addColumn('domain', 'text', (col) => col.notNull())
|
|
.addColumn('active', 'boolean', (col) => col.notNull())
|
|
.execute();
|
|
}
|