-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downgrade issue from 2.12.1 to 2.11.0 #21470
Comments
Hi Team, Can you please help here? do we need to update any parameter to allow us this rollback? |
Downgrade isn't always possible if table changes are involved. if not, this are the table changes in 2.12, so you could remove those columns and it should be ok. ALTER TABLE robot ADD COLUMN IF NOT EXISTS creator_ref integer default 0;
ALTER TABLE robot ADD COLUMN IF NOT EXISTS creator_type varchar(255);
ALTER TABLE p2p_preheat_policy ADD COLUMN IF NOT EXISTS scope varchar(255);
The safest way, however, is to roll back the DB |
Hi @Vad1mo, The downgrade to lower versions like 2.10.2 and 2.10.0 has worked perfectly fine, how is that possible? we didnt expect it to fail when coming back to 2.11.0 since PG version is 15 between 2.11.0 and 2.12.1, while 2.10.0 and 2.10.2 had PG14 versions |
You message does not provide enough context to be able to provide you with an answer |
Hi @Vad1mo, We have a scenario where we are trying to upgrade deployments with version 2.10.0, 2.10.2, 2.11.0 to the latest harbor version 2.12.1(critical vulnerability is fixed here). |
You should update the schema_migrations after rollback the db schema
|
Hi Team,
I am trying to rollback my system after a successful upgrade to 2.12.1 back to 2.11.0. But this seems to be not possible as i see core is failing with below logs:
2025-01-29T13:46:05.221154712+02:00 stdout F 2025-01-29T11:46:05Z [INFO] [/lib/config/config.go:92]: init secret store
2025-01-29T13:46:05.221154712+02:00 stdout F 2025-01-29T11:46:05Z [INFO] [/core/main.go:166]: configurations initialization completed
2025-01-29T13:46:05.221154712+02:00 stdout F 2025-01-29T11:46:05Z [INFO] [/common/dao/base.go:67]: Registering database: type-PostgreSQL host-postgresql port-5432 database-registry sslmode-"disable"
2025-01-29T13:46:05.225712516+02:00 stdout F 2025-01-29T11:46:05Z [INFO] [/common/dao/base.go:72]: Register database completed
2025-01-29T13:46:05.234596053+02:00 stdout F 2025-01-29T11:46:05Z [INFO] [/common/dao/pgsql.go:135]: Upgrading schema for pgsql ...
2025-01-29T13:46:05.234968323+02:00 stdout F 2025-01-29T11:46:05Z [INFO] [/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:810]: error: no migration found for version 150: read down for version 150 .: file does not exist
2025-01-29T13:46:05.235036196+02:00 stdout F 2025-01-29T11:46:05Z [ERROR] [/common/dao/pgsql.go:140]: Failed to upgrade schema, error: "no migration found for version 150: read down for version 150 .: file does not exist"
2025-01-29T13:46:05.235200032+02:00 stdout F 2025-01-29T11:46:05Z [FATAL] [/core/main.go:201]: failed to migrate the database, error: no migration found for version 150: read down for version 150 .: file does not exist
Steps to reproduce issue:
The text was updated successfully, but these errors were encountered: