SurfSense/surfsense_backend/alembic
CREDO23 3b31352e19 fix: make migration 168 idempotent for from-scratch upgrades
Migration 168 used bare add_column/drop_column, so `alembic upgrade head`
from an empty DB failed at 168 ("column revoked_at already exists"): the
0_initial_schema migration bootstraps via Base.metadata.create_all (the live
ORM shape), which already includes the hardened refresh_tokens columns, and
168's unguarded ALTERs then collided.

Guard every step (ADD COLUMN IF NOT EXISTS, DROP COLUMN IF EXISTS, existence-
checked backfill) so 168 no-ops on already-hardened (create_all) databases
while still fully transforming legacy is_revoked-shape databases. Matches the
guarded style already used by migrations 92/149/169. Net schema effect is
unchanged. Restores a clean from-scratch `alembic upgrade head` to head.
2026-06-26 11:35:30 +02:00
..
versions fix: make migration 168 idempotent for from-scratch upgrades 2026-06-26 11:35:30 +02:00
env.py feat(docker): add ZERO_AUTO_RESET configuration for improved replication safety 2026-06-06 14:21:14 +05:30
README add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00
script.py.mako add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00

Generic single-database configuration with an async dbapi.