diff --git a/CHANGELOG.md b/CHANGELOG.md index 55cf421858f..a5f9608f9db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ * [FEATURE] EXPERIMENTAL: Added `/series` API endpoint support with TSDB blocks storage. #1830 * [FEATURE] Added "multi" KV store that can interact with two other KV stores, primary one for all reads and writes, and secondary one, which only receives writes. Primary/secondary store can be modified in runtime via runtime-config mechanism (previously "overrides"). #1749 * [ENHANCEMENT] Added `password` and `enable_tls` options to redis cache configuration. Enables usage of Microsoft Azure Cache for Redis service. +* [BUGFIX] Wrapped migration in BEGIN and COMMIT #1980 * [BUGFIX] Fixed unnecessary CAS operations done by the HA tracker when the jitter is enabled. #1861 * [BUGFIX] Fixed #1904 ingesters getting stuck in a LEAVING state after coming up from an ungraceful exit. #1921 * [BUGFIX] Reduce memory usage when ingester Push() errors. #1922 diff --git a/cmd/cortex/migrations/002_immutable_configs.up.sql b/cmd/cortex/migrations/002_immutable_configs.up.sql index 38b7575de39..be70b2fb595 100644 --- a/cmd/cortex/migrations/002_immutable_configs.up.sql +++ b/cmd/cortex/migrations/002_immutable_configs.up.sql @@ -2,6 +2,10 @@ -- process (as exemplified in users/db/migrations/006 to 010), but currently -- there are no data in production and only one row in dev. +-- https://github.com/mattes/migrate/tree/master/database/postgres#upgrading-from-v1 +-- Wrap all commands in BEGIN and COMMIT to accommodate upgrade +BEGIN; + -- The existing id, type columns are the id & type of the entity that owns the -- config. ALTER TABLE configs RENAME COLUMN id TO owner_id; @@ -12,3 +16,5 @@ ALTER TABLE configs ADD COLUMN id SERIAL; ALTER TABLE configs DROP CONSTRAINT configs_pkey; ALTER TABLE configs ADD PRIMARY KEY (id, owner_id, owner_type, subsystem); + +COMMIT;