mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
migration adds is_admin column to users
This commit is contained in:
parent
897c39c85c
commit
deb1d457e1
13
database/migrations/0034-drop_server_user_table.ts
Normal file
13
database/migrations/0034-drop_server_user_table.ts
Normal file
@ -0,0 +1,13 @@
|
||||
/* MIGRATION DROP server_users TABLE
|
||||
add isAdmin COLUMN to users TABLE */
|
||||
|
||||
/* 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 `is_admin` boolean DEFAULT false AFTER `language`;')
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn('ALTER TABLE `users` DROP COLUMN `is_admin`;')
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user