Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: don't show not found database in schema editor (#4946)
boojack32440db5aefe
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vueindex 8eca1ce57b..90e8dc9928 100644--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue@@ -493,9 +493,9 @@ const generateTenant = async () => {project.id);if (isAlterSchema.value && allowUsingSchemaEditor(databaseList)) {- schemaEditorContext.value.databaseIdList = databaseList.map(- (database) => database.id- );+ schemaEditorContext.value.databaseIdList = databaseList+ .filter((database) => database.syncStatus === "OK")+ .map((database) => database.id);state.showSchemaEditorModal = true;return;}@@ -508,7 +508,10 @@ const generateTenant = async () => {const databaseList: Database[] = [];const databaseStore = useDatabaseStore();for (const databaseId of state.selectedDatabaseIdListForTenantMode) {- databaseList.push(databaseStore.getDatabaseById(databaseId));+ const database = databaseStore.getDatabaseById(databaseId);+ if (database.syncStatus === "OK") {+ databaseList.push(databaseStore.getDatabaseById(databaseId));+ }}if (isAlterSchema.value && allowUsingSchemaEditor(databaseList)) {schemaEditorContext.value.databaseIdList = Array.from(@@ -539,7 +542,11 @@ const generateTenant = async () => {};const selectDatabase = async (database: Database) => {- if (isAlterSchema.value && allowUsingSchemaEditor([database])) {+ if (+ isAlterSchema.value &&+ database.syncStatus === "OK" &&+ allowUsingSchemaEditor([database])+ ) {schemaEditorContext.value.databaseIdList = [database.id];state.showSchemaEditorModal = true;return;diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vueindex 83ac4fd573..0825ca0b65 100644--- a/frontend/src/views/DatabaseDetail.vue+++ b/frontend/src/views/DatabaseDetail.vue@@ -579,7 +579,10 @@ const createMigration = async (type AlterMode = "online" | "normal" | false;let mode: AlterMode = "normal";if (type === "bb.issue.database.schema.update") {- if (allowUsingSchemaEditor([database.value])) {+ if (+ database.value.syncStatus === "OK" &&+ allowUsingSchemaEditor([database.value])+ ) {state.showSchemaEditorModal = true;return;}