Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: skip SQL check if nothing changed in the local state (#8795)

ecmadao60e2ef29e85b
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
index 9d6bffa36d..95742b1ef6 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
@@ -51,6 +51,12 @@ export const useSchemaEditorSQLCheck = (params: {
if (!databaseSchema) {
return { errors: [], statement: "" };
}
+ if (isEqual(databaseSchema.schemaList, databaseSchema.originSchemaList)) {
+ return {
+ errors: [t("schema-editor.nothing-changed")],
+ statement: "",
+ };
+ }
const metadata = await dbSchemaV1Store.getOrFetchDatabaseMetadata(
db.name,
false /* !skipCache */,