mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
|
|
import { InstanceSettings } from '@entities/instance_settings.entity';
|
||
|
|
import { INSTANCE_SETTINGS_TYPE, INSTANCE_USER_SETTINGS } from '@modules/instance-settings/constants';
|
||
|
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||
|
|
|
||
|
|
export class AddEnableMultiplayerSettingsInInstanceSettings1693368672418 implements MigrationInterface {
|
||
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||
|
|
const entityManager = queryRunner.manager;
|
||
|
|
const enableMultiplayer = 'true';
|
||
|
|
|
||
|
|
await entityManager.insert(InstanceSettings, {
|
||
|
|
label: 'Multiplayer editing',
|
||
|
|
labelKey: 'header.organization.menus.manageSSO.generalSettings.enableMultiplayerEditing',
|
||
|
|
dataType: 'boolean',
|
||
|
|
value: process.env?.ENABLE_MULTIPLAYER_EDITING || enableMultiplayer,
|
||
|
|
key: INSTANCE_USER_SETTINGS.ENABLE_MULTIPLAYER_EDITING,
|
||
|
|
type: INSTANCE_SETTINGS_TYPE.USER,
|
||
|
|
helperText: 'Work collaboratively and edit applications in real-time with multi-player editing',
|
||
|
|
helperTextKey: 'header.organization.menus.manageSSO.generalSettings.enableMultiplayerEditing',
|
||
|
|
createdAt: new Date(),
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
||
|
|
}
|