fix(tradein/deploy): миграции ДО подъёма app-контейнеров + manifest-инвариант (#2216) #2228
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2228
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/tradein-migrations-before-up"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
pull→up -d --no-deps postgres(только БД) →pg_isready-цикл (30×2s, fail=exit 1) → весь блок миграций (внутренности байт-идентичны, только перемещены) → reader-password bootstrap →up -d browser backend frontend(+условный scraper) → Caddy reload → health → cleanup. Сбой миграции = exit 1 до подъёма нового кода — старые контейнеры остаются на консистентной паре код↔схема.docker restart tradein-backendудалён (backend стартует после миграций, FDW server уже существует; история сохранена в комментарии)._schema_migrationsи репоdata/sqlсовпадают (154 == 154, diff пуст; проверено на проде 2026-07-02 — аудит снят со стейл-ветки)._manifest_applied.txt(154 имени) +test_migrations_manifest.py— red при переименовании/удалении применённой миграции (tracking по bare-filename → rename = повторное выполнение на проде) и при дубль-NN-префиксе новых файлов; 6 исторических дублей (084/108/113/121/124/130) grandfathered. Manifest дополняется автором в том же PR (подсказка в assert).Как проверено
Refs #2216