github RayLabsHQ/gitea-mirror v3.17.1

5 hours ago

Highlights

🐛 Fixes #312 — crash loop after upgrading to v3.17.0. Some instances failed to start with:

DrizzleError: Failed to run the query 'ALTER TABLE `sso_providers` ADD `saml_config` text;'
SQLiteError: duplicate column name: saml_config

Migration 0013 adds saml_config / domain_verified to sso_providers, but on affected databases those columns already existed before the migration ran. The ADD failed with a duplicate-column error, rolling back the whole migration (so it was never recorded) and re-failing on every boot.

What this release does

  • Adds a pre-migration self-heal step (mirroring the existing repairFailedMigrations() recovery): when migration 0013 is pending but the columns already exist, it preserves any real SAML provider config, drops the stranded columns so the canonical 0013 runs in full (the organizations table rebuild included), then restores the preserved data.
  • No manual action required — affected instances recover automatically on the next boot after upgrading.
  • No-op on fresh installs, clean upgrades, and already-migrated databases.

Upgrade notes

Just pull v3.17.1 (or latest) and restart. If you had registered a SAML SSO provider, its config is preserved across the upgrade; OIDC/OAuth providers are unaffected.

Manual fallback (only if you cannot upgrade yet): stop the app and run, against your data/gitea-mirror.db:

sqlite3 data/gitea-mirror.db "ALTER TABLE sso_providers DROP COLUMN saml_config;"
sqlite3 data/gitea-mirror.db "ALTER TABLE sso_providers DROP COLUMN domain_verified;"

(Skip whichever column reports "no such column", and back up the .db file first.) Then restart.

Full changelog: v3.17.0...v3.17.1

Don't miss a new gitea-mirror release

NewReleases is sending notifications on new releases.