mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
database migration
This commit is contained in:
parent
9256439cf9
commit
2d56f73664
16
database/migrations/0067-private_key_in_community_table.ts
Normal file
16
database/migrations/0067-private_key_in_community_table.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/* MIGRATION TO ADD PRIVATE KEY IN COMMUNITY TABLE
|
||||
*
|
||||
* This migration adds a field for the private key in the community.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 `communities` ADD COLUMN `private_key` binary(64) DEFAULT NULL AFTER `public_key`;',
|
||||
)
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn('ALTER TABLE `communities` DROP COLUMN `private_key`;')
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user