ToolJet/server/data-migrations/1774530738974-SetAppPromoteAndReleaseTrueAdmins.ts
Rudhra Deep Biswas 64c5120e6a
App Promote/Release Fix Migration (#15720)
* App Promote/Release Fix

* remove log

* improve set app migration
2026-03-27 20:28:53 +05:30

17 lines
573 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm';
export class SetAppPromoteAndReleaseTrueAdmins1774530738974 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
UPDATE permission_groups
SET app_promote = true, app_release = true
WHERE name = 'admin'
AND type = 'default'
AND (app_promote = false OR app_release = false)
`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
// No-op: cannot reliably determine previous state
}
}