Skip to content

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

chore(frontend): applying changelist to database should fallback to DDL instead of DML (#9164)

Liu Jie0d4f79ceaea
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
index e2feff7c81..90d28a6597 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
@@ -135,13 +135,15 @@ const environmentList = useEnvironmentV1List(false /* !showDeleted */);
const guessedDatabaseChangeType = computed(() => {
if (
- changelist.value.changes.some(
- (change) => guessChangelistChangeType(change) === "DDL"
+ changelist.value.changes.every(
+ (change) => guessChangelistChangeType(change) === "DML"
)
) {
- return "DDL";
+ // When ALL of the changes are DML, we are confident that the whole
+ // changelist could be a DML
+ return "DML";
}
- return "DML";
+ return "DDL";
});
const databaseList = computed(() => {