ToolJet/server/migrations/1649860649643-AddIsMaintenanceOnToApp.ts
Muhsin Shah C P 380ea73b30
[Feature] Added a feature to show maintenance state of an app (#2820)
* Implmented toggle and confirmation modal
- Also maintenance state will store in db as a global setting

* Added is_maintenance_on column to apps table

* Now maintenance state will store in app entity

* Lauch btn will be disabled for on-maintenance apps

* Users can't see preview using shared links when app is on maintenance

* Changed toggle name

* Changed maintenance dialog message
- Changed button text
- Fixed some alignment
2022-04-21 22:08:54 +05:30

18 lines
524 B
TypeScript

import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
export class AddIsMaintenanceOnToApp1649860649643 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumn(
'apps',
new TableColumn({
name: 'is_maintenance_on',
type: 'boolean',
default: false,
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('apps', 'is_maintenance_on');
}
}