Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Give the two changesets that shared v65.2026-10-16T00:00:00 their own ids (#84829)

Alexander Polyankin706fd4822474
diff --git a/resources/migrations/065/20261016_dependency_status_unresolved_tables.yaml b/resources/migrations/065/20261016_dependency_status_unresolved_tables.yaml
index fd1db922578..3991c656885 100644
--- a/resources/migrations/065/20261016_dependency_status_unresolved_tables.yaml
+++ b/resources/migrations/065/20261016_dependency_status_unresolved_tables.yaml
@@ -1,11 +1,31 @@
## A native query can name a table that sync hasn't found yet. The backfill flags such entities, so that the next sync
## of their database recomputes them and records the table once it exists.
+## This changeset and the first of 20261016_remote_sync_object_user_settings.yaml were both merged as
+## v65.2026-10-16T00:00:00, so the first changeset here deletes that id and both run again under their own ids.
databaseChangeLog:
- changeSet:
- id: v65.2026-10-16T00:00:00
+ id: v65.2026-10-20T00:00:00
+ author: ranquild
+ comment: Delete v65.2026-10-16T00:00:00, the id two changesets shared before they got their own ids
+ changes:
+ - sql:
+ sql: DELETE FROM ${databasechangelog.name} WHERE id = 'v65.2026-10-16T00:00:00'
+ rollback: []
+
+ - changeSet:
+ id: v65.2026-10-20T00:00:01
author: ranquild
comment: Add dependency_status.unresolved_tables, flagging entities that name tables matching nothing
+ preConditions:
+ - onFail: MARK_RAN
+ - not:
+ - columnExists:
+ tableName: dependency_status
+ columnName: unresolved_tables
+ - sqlCheck:
+ expectedResult: 0
+ sql: SELECT COUNT(*) FROM ${databasechangelog.name} WHERE id = 'v65.u3r8zm'
changes:
- addColumn:
tableName: dependency_status
diff --git a/resources/migrations/065/20261016_remote_sync_object_user_settings.yaml b/resources/migrations/065/20261016_remote_sync_object_user_settings.yaml
index 0284b97a93a..d4982fdea1e 100644
--- a/resources/migrations/065/20261016_remote_sync_object_user_settings.yaml
+++ b/resources/migrations/065/20261016_remote_sync_object_user_settings.yaml
@@ -1,11 +1,12 @@
## Remote sync now tracks a published table through its TableUserSettings, FieldUserSettings, and Dimensions
## rather than its Table and Fields. A Table or Field row whose table or field has a user settings row, and no row of
## that user settings yet, becomes that user settings row, keeping its pending status so unpushed changes are still
-## pushed; the rest are deleted after.
+## pushed; the rest are deleted after. The first changeset was merged as v65.2026-10-16T00:00:00, an id it shared with
+## 20261016_dependency_status_unresolved_tables.yaml, which deletes that id; it is idempotent, so it runs again harmlessly.
databaseChangeLog:
- changeSet:
- id: v65.2026-10-16T00:00:00
+ id: v65.2026-10-20T00:00:02
author: ranquild
comment: Turn the RemoteSyncObject rows of Tables with user settings into TableUserSettings rows
changes:
diff --git a/test/metabase/app_db/schema_migrations_test.clj b/test/metabase/app_db/schema_migrations_test.clj
index 3012987572e..bde7bf8b067 100644
--- a/test/metabase/app_db/schema_migrations_test.clj
+++ b/test/metabase/app_db/schema_migrations_test.clj
@@ -3956,9 +3956,9 @@
(is (empty? (t2/select :data_app_group_assignment)))))))
(deftest remote-sync-object-user-settings-test
- (testing "v65.2026-10-16T00:00:00-02: the RemoteSyncObject rows of Tables and Fields with user settings become their
+ (testing "v65.2026-10-20T00:00:02, v65.2026-10-16T00:00:01-02: the RemoteSyncObject rows of Tables and Fields with user settings become their
user settings' rows, keeping their status, unless those are already tracked, and the rest are deleted"
- (impl/test-migrations ["v65.2026-10-16T00:00:00" "v65.2026-10-16T00:00:02"] [migrate!]
+ (impl/test-migrations ["v65.2026-10-20T00:00:02" "v65.2026-10-16T00:00:02"] [migrate!]
(let [db-id (t2/insert-returning-pk! :metabase_database {:name "Remote Sync User Settings Test DB"
:engine "h2"
:created_at :%now