Revert "Merge data-apps specific migrations into one"

This reverts commit 383a5fa28d.
This commit is contained in:
Timofei
2026-07-16 17:23:05 +04:00
parent d5fb5a64b9
commit 948d904b62
2 changed files with 35 additions and 34 deletions

View File

@@ -2,7 +2,7 @@
##
## Data apps come from the repository connected via the remote-sync feature. The
## repo root has a `data_apps/` directory; each subdirectory is one app and
## contains a `data_app.yaml` (name/path/allowed_hosts) plus its built bundle. Each app dir
## contains a `data_app.yaml` (name/path) plus its built bundle. Each app dir
## is materialized as one row in this table on sync. The `bundle` / `bundle_hash`
## columns cache the last successfully synced bytes (nullable until first sync).
@@ -41,12 +41,6 @@ databaseChangeLog:
remarks: Human-readable name from the manifest, shown in the admin UI
constraints:
nullable: false
- column:
name: allowed_hosts
type: ${text.type}
remarks: JSON array of origins the sandboxed bundle may fetch/XHR. NULL when none configured.
constraints:
nullable: true
- column:
name: bundle_path
type: varchar(1024)
@@ -146,30 +140,3 @@ databaseChangeLog:
# rollback drops it. Reverting the column first would only run right before
# that DROP (and could fail once the table is gone). See the bundle changeset.
rollback: []
- changeSet:
id: v64.2026-05-28T00:00:03
author: timofei
comment: >-
Add data_app.allowed_hosts. A JSON array of origins the app's sandboxed
bundle may fetch/XHR; NULL/empty means none. Guarded so pre-existing
tables pick it up while fresh installs that already created it skip it.
preConditions:
- onFail: MARK_RAN
- not:
- columnExists:
tableName: data_app
columnName: allowed_hosts
changes:
- addColumn:
tableName: data_app
columns:
- column:
name: allowed_hosts
type: ${text.type}
remarks: JSON array of origins the sandboxed bundle may fetch/XHR. NULL when none configured.
constraints:
nullable: true
# No-op rollback: created in the same deployment as the table, whose own
# rollback drops it (see the enabled/bundle changesets).
rollback: []

View File

@@ -0,0 +1,34 @@
## Adds data_app.allowed_hosts — a JSON array of origins the app's sandboxed
## bundle may fetch/XHR (NULL/empty means none).
##
## Split into its own file rather than appended to 20260528_data_app.yaml so the
## table-creation migration stays self-contained. The changeset is guarded with
## `onFail: MARK_RAN` on `not columnExists`, so an instance that already added
## this column under the earlier branch state fails the precondition and is
## marked as ran (no re-run); fresh installs apply it normally.
databaseChangeLog:
- changeSet:
id: v64.2026-05-28T00:00:03
author: timofei
comment: >-
Add data_app.allowed_hosts. A JSON array of origins the app's sandboxed
bundle may fetch/XHR; NULL/empty means none. Guarded so pre-existing
tables pick it up while fresh installs that already created it skip it.
preConditions:
- onFail: MARK_RAN
- not:
- columnExists:
tableName: data_app
columnName: allowed_hosts
changes:
- addColumn:
tableName: data_app
columns:
- column:
name: allowed_hosts
type: ${text.type}
remarks: JSON array of origins the sandboxed bundle may fetch/XHR. NULL when none configured.
constraints:
nullable: true
rollback: []