mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
add keypair columns in communities
This commit is contained in:
parent
657862048e
commit
85e8df9615
@ -0,0 +1,18 @@
|
||||
/* MIGRATION TO ADD JWT-KEYPAIR IN COMMUNITY TABLE
|
||||
*
|
||||
* This migration adds fields for the jwt-keypair in the community.table
|
||||
*/
|
||||
|
||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn(
|
||||
'ALTER TABLE `communities` ADD COLUMN `public_jwt_key` varchar(512) DEFAULT NULL AFTER `gms_api_key`;',
|
||||
)
|
||||
await queryFn(
|
||||
'ALTER TABLE `communities` ADD COLUMN `private_jwt_key` varchar(2048) DEFAULT NULL AFTER `public_jwt_key`;',
|
||||
)
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn('ALTER TABLE `communities` DROP COLUMN `public_jwt_key`;')
|
||||
await queryFn('ALTER TABLE `communities` DROP COLUMN `private_jwt_key`;')
|
||||
}
|
||||
@ -54,6 +54,12 @@ export class Community extends BaseEntity {
|
||||
@Column({ name: 'gms_api_key', type: 'varchar', length: 512, nullable: true, default: null })
|
||||
gmsApiKey: string | null
|
||||
|
||||
@Column({ name: 'public_jwt_key', type: 'varchar', length: 512, nullable: true })
|
||||
publicJwtKey: string | null
|
||||
|
||||
@Column({ name: 'private_jwt_key', type: 'varchar', length: 2048, nullable: true })
|
||||
privateJwtKey: string | null
|
||||
|
||||
@Column({
|
||||
name: 'location',
|
||||
type: 'geometry',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user