mirror of
https://github.com/bitbaum/petvity.git
synced 2026-12-04 06:18:09 +01:00
drizzle/0000_pretty_cammi.sql was in the journal but never committed, and the objects between it and 0001 (adoption, seller profiles, signal history, 16 indexes) were reconciled with db:push, so the chain could not build an empty database. The baseline is generated from 0001's snapshot minus what 0001 itself adds, and 0000_snapshot.json now records that state, so every step's snapshot diff matches its SQL. Every baseline statement is guarded (CREATE TABLE/INDEX IF NOT EXISTS, CREATE TYPE and foreign keys in a block that ignores duplicate_object), so loki apply-schema.sh, which will see 0000_pretty_cammi as pending on prod, applies it as a no-op there. Checked against a tip-state database with 0001..0007 in its ledger: no error and an identical shape afterwards. browser-smoke now replays the migrations the way the deploy batches them (scripts/ci/migrations-replay.sh) and fails when the result differs from drizzle-kit push. Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 Co-authored-by: Claude <noreply@anthropic.com>