Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c70c490
[Build] Check the schema steps on every pull request
shba24 Nov 10, 2026
18be7a1
[Server] Retry a schema upgrade that stopped part way
shba24 Nov 10, 2026
76ea533
[Build] Tighten the schema step rules after review
shba24 Nov 11, 2026
5f3b96b
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 11, 2026
6d7c5d1
[Build] Check effect files and fixed inputs through one column check
shba24 Nov 11, 2026
659f7f4
[Build] Simplify the enum member check and correct the index rule doc
shba24 Nov 11, 2026
1a875ec
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 11, 2026
0159c18
[Build] Catch unbounded numeric and dropped MySQL defaults in the ste…
shba24 Nov 11, 2026
37ba0ad
[Build] Refuse a later-step index on a text column too long to index
shba24 Nov 12, 2026
2b18d4e
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
779528a
[Build] Size the whole index key, and refuse types the rule can't bound
shba24 Nov 12, 2026
a4f5da3
[Build] Count the index entry's headers in the key-size rule
shba24 Nov 12, 2026
dca3713
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
c1e1e27
[Build] Run the schema step checks in the all-tests rows
shba24 Nov 12, 2026
c77fd19
[Build] Close the index-size and enum gaps Yi found in the step rules
shba24 Nov 12, 2026
2684699
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
79620ca
[Build] Refuse a later-step partial index
shba24 Nov 12, 2026
2837e85
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
e33ad77
[Build] Let updateSchemaDumps write the effect files of several new s…
shba24 Nov 12, 2026
070da79
[Build] Read a PostgreSQL negative numeric scale as negative in the s…
shba24 Nov 12, 2026
487cf48
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
e1f8cac
[Build] Allow only literal defaults, and re-size an index whose colum…
shba24 Nov 12, 2026
8de2526
[Build] Say why the schema step check failed, and record steps with t…
shba24 Nov 12, 2026
2c07b04
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
431a23e
[Build] Re-size an index only when a column's type, size or scale cha…
shba24 Nov 12, 2026
6ca5ec6
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
a395b2c
[Build] Move the domain reviewer's Flyway line to its own PR
shba24 Nov 12, 2026
253a7b0
Merge stack/uc-upgrade-merge-checks into stack/uc-upgrade-retry
shba24 Nov 12, 2026
dcfc013
Merge main before the #2113 squash into stack/uc-upgrade-retry
shba24 Nov 13, 2026
4059d0f
Record the #2113 squash merge (tree already contains it)
shba24 Nov 13, 2026
3ec321c
Merge main into stack/uc-upgrade-retry
shba24 Nov 13, 2026
6dc93e9
[Server] Keep another release's failed step, and resume an adoption s…
shba24 Nov 13, 2026
d4c1b00
[Server] Accept as a stopped first step only what its rerun completes
shba24 Nov 13, 2026
31bde32
Merge main into stack/uc-upgrade-retry
shba24 Nov 16, 2026
1e41dcd
Adopt a database without schema history at whichever step's schema it…
shba24 Nov 16, 2026
68155f7
Check that an adoption at an earlier step records this release's step…
shba24 Nov 17, 2026
6207460
Restore auto-commit on the migrator's connections, and say what the a…
shba24 Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions docs/server/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ set up, Hibernate changes nothing.
then exits without starting the server: with 0 when it succeeds, and with 1 and the reason when it
refuses. It sets up an empty database (a new install), adopts a database from the baseline
release, and applies the steps that are not applied yet.
If it fails, fix the cause it names and run the same command again: it also retries a step that a
crash left half done.

## The baseline release

The first baseline release is 0.7.0: schema version 1 is its schema. A database without schema
history is adopted as version 1 when its schema matches version 1 exactly, and as the latest version
when it matches that exactly, such as a database that a server of this release set up when it
started; `--upgrade-schema` lists every difference. A database from an earlier release must be
history is adopted at the version whose schema it matches exactly: version 1, the latest version,
such as a database that a server of this release set up when it started, or a version between
them; `--upgrade-schema` lists every difference. A database from an earlier release must be
upgraded to 0.7.0 first: start a 0.7.0 server on it once, stop it, then upgrade it to this release.
Such a database still differs from version 1 in two checks, so repair it first (see
[Repairing a database from before 0.7.0](#repairing-a-database-from-before-070)).
Expand Down Expand Up @@ -139,7 +141,7 @@ widened) while the schema history still records the step.

Messages that `--upgrade-schema` prints when it refuses, and what to do.

`The database has no schema history, and its schema is neither the schema of version 1 nor that of version <m>. It differs from version 1 in:`
`The database schema is neither the schema of version <n-1> nor that of version <n>, so schema step <n> can't run. It differs from version <v> in:`
: Followed by one line per difference (`missing ...` or `unexpected ...`). Repair the differences or
restore the backup, then run `bin/start-uc-server --upgrade-schema` again. A database from before
0.7.0 shows the differences that
Expand All @@ -161,10 +163,7 @@ Messages that `--upgrade-schema` prints when it refuses, and what to do.
: Flyway's check of `uc_schema_history` failed, for example because a recorded step differs from
this release's step of the same version (its checksum), or this release lacks a recorded step.
`<reasons>` may advise Flyway's `repair` command, which Unity Catalog doesn't have. Run the release
that applied the steps, or restore the backup. Do not edit `uc_schema_history` by hand. On H2 and
MySQL, a step that failed is reported here too: this release can't retry it, so restore the backup
and fix the cause, then run the command on the restored database. On PostgreSQL, a failed step
leaves no history row, so the command runs it again.
that applied the steps, or restore the backup. Do not edit `uc_schema_history` by hand.

`Could not take the schema migration lock: <reason>`
: The command could not get the lock that keeps two migration runs apart, so it changed nothing.
Expand Down
Loading
Loading