mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add migration for the new fields.
This commit is contained in:
parent
84afbf9a9e
commit
ce909108a9
12
database/migrations/0059-add_hide_amount_to_users.ts
Normal file
12
database/migrations/0059-add_hide_amount_to_users.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/* 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 users ADD COLUMN hideAmountGDD bool DEFAULT false;')
|
||||||
|
await queryFn('ALTER TABLE users ADD COLUMN hideAmountGDT bool DEFAULT false;')
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||||
|
await queryFn('ALTER TABLE users DROP COLUMN hideAmountGDD;')
|
||||||
|
await queryFn('ALTER TABLE users DROP COLUMN hideAmountGDT;')
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user