mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add referrer id migration
This commit is contained in:
parent
efe8d0c63b
commit
f49610aef4
14
database/migrations/0033-add_referrer_id.ts
Normal file
14
database/migrations/0033-add_referrer_id.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/* MIGRATION TO ADD referrer_id FIELD TO users */
|
||||
|
||||
/* 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 `referrer_id` int UNSIGNED DEFAULT NULL AFTER `language`;',
|
||||
)
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn('ALTER TABLE `users` DROP COLUMN `referrer_id`;')
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user