feat(core): Only show V1 banner to users who migrated (#6622)

* feat(editor): Only show V1 banner to users who migrated

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>

* Set the v1 banner dismissed flag in settings table create migration

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>

---------

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
OlegIvaniv 2023-07-07 15:57:05 +02:00 committed by GitHub
parent 20737b5324
commit 071e56f7fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View file

@ -154,6 +154,11 @@ export class CreateUserManagement1646992772331 implements ReversibleMigration {
await queryRunner.query(
`INSERT INTO ${tablePrefix}settings (\`key\`, value, loadOnStartup) VALUES ("userManagement.isInstanceOwnerSetUp", "false", 1), ("userManagement.skipInstanceOwnerSetup", "false", 1)`,
);
await queryRunner.query(`
INSERT INTO "${tablePrefix}settings" (key, value, loadOnStartup)
VALUES ('ui.banners.v1.dismissed', 'true', true)
`);
}
async down({ queryRunner, tablePrefix }: MigrationContext) {

View file

@ -133,6 +133,11 @@ export class CreateUserManagement1646992772331 implements ReversibleMigration {
await queryRunner.query(
`INSERT INTO ${tablePrefix}settings ("key", "value", "loadOnStartup") VALUES ('userManagement.isInstanceOwnerSetUp', 'false', true), ('userManagement.skipInstanceOwnerSetup', 'false', true)`,
);
await queryRunner.query(`
INSERT INTO "${tablePrefix}settings" (key, value, loadOnStartup)
VALUES ('ui.banners.v1.dismissed', 'true', true)
`);
}
async down({ queryRunner, tablePrefix }: MigrationContext) {

View file

@ -94,6 +94,11 @@ export class CreateUserManagement1646992772331 implements ReversibleMigration {
INSERT INTO "${tablePrefix}settings" (key, value, loadOnStartup) values
('userManagement.isInstanceOwnerSetUp', 'false', true), ('userManagement.skipInstanceOwnerSetup', 'false', true)
`);
await queryRunner.query(`
INSERT INTO "${tablePrefix}settings" (key, value, loadOnStartup)
VALUES ('ui.banners.v1.dismissed', 'true', true)
`);
}
async down({ queryRunner, tablePrefix }: MigrationContext) {