mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
18 lines
708 B
TypeScript
18 lines
708 B
TypeScript
/* MIGRATION TO CREATE THE FEDERATION COMMUNITY TABLES
|
|
*
|
|
* This migration creates the `community` and 'communityfederation' tables in the `apollo` database (`gradido_community`).
|
|
*/
|
|
|
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
|
|
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
await queryFn(
|
|
`ALTER TABLE communities ADD COLUMN verified_at datetime(3) DEFAULT NULL AFTER last_announced_at;`,
|
|
)
|
|
}
|
|
|
|
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
await queryFn(`ALTER TABLE communities DROP COLUMN verified_at;`)
|
|
}
|