Migrate Down on 49 doesn't work #41641
Labels
.Backend
Priority:P1
Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness
.Regression
Bugs that were previously fixed and/or bugs unintentionally shipped with new features.
Type:Bug
Product defects
Milestone
Describe the bug
Running migrate down on 49 will end up breaking the instance ... You are screwed if you don't have a backup
To Reproduce
Deploy 1.49.6 and run the
java -jar metabase.jar migrate down
commandExpected behavior
No response
Logs
When you run the migrate down you will see those logs:
2024-04-18 16:21:44,470 INFO metabase.util :: Maximum memory available to JVM: 4.0 GB
2024-04-18 16:21:47,401 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓
For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html
2024-04-18 16:21:49,863 ERROR public-settings.premium-features :: Error validating token : Assert failed: Metabase DB is not yet set up
((requiring-resolve (quote metabase.db/db-is-set-up?)))
2024-04-18 16:21:56,408 INFO driver.impl :: Registered abstract driver :sql 🚚
2024-04-18 16:21:56,430 INFO driver.impl :: Registered abstract driver :sql-jdbc (parents: [:sql]) 🚚
2024-04-18 16:21:56,439 INFO metabase.util :: Load driver :sql-jdbc took 131.9 ms
2024-04-18 16:21:56,440 INFO driver.impl :: Registered driver :h2 (parents: [:sql-jdbc]) 🚚
2024-04-18 16:21:56,733 INFO driver.impl :: Registered driver :mysql (parents: [:sql-jdbc]) 🚚
2024-04-18 16:21:56,785 INFO driver.impl :: Registered driver :postgres (parents: [:sql-jdbc]) 🚚
2024-04-18 16:22:01,534 INFO metabase.core ::
Metabase v1.49.7-SNAPSHOT (dc62587)
Copyright © 2024 Metabase, Inc.
Metabase Enterprise Edition extensions are PRESENT.
Usage of Metabase Enterprise Edition features are subject to the Metabase Commercial License. See https://www.metabase.com/license/commercial/ for details.
2024-04-18 16:22:02,750 INFO db.setup :: Setting up Liquibase...
2024-04-18 16:22:04,998 INFO db.setup :: Liquibase is ready.
2024-04-18 16:22:05,075 INFO db.liquibase :: Rolling back app database schema to version 48
2024-04-18 16:22:08,819 INFO db.custom-migrations :: No rollback for: DeleteScanFieldValuesTriggerForDBThatTurnItOff
2024-04-18 16:22:09,419 INFO db.custom-migrations :: No rollback for: DeleteTruncateAuditLogTask
Then when you try to load metabase on 1.48.11 you end up with metabase restart errors:
Information about your Metabase installation
Severity
If by mistake you upgrade and decide to run a migrate down without taking a backup you are screwed
Additional context
No response
The text was updated successfully, but these errors were encountered: