* Fix broken drizzle migration chain and add prevention guidelines The migration system was broken due to three issues: 1. Snapshot 0067 had an invalid `autoincrement` field (PostgreSQL doesn't support this) causing Zod validation to fail with "data is malformed" 2. Migrations 0068 and 0069 were missing snapshot files, breaking the snapshot chain required by `drizzle-kit generate` 3. Orphaned file 0048_mean_enchantress.sql existed outside the journal Fixed by removing the invalid field, regenerating migrations 0068-0069 with proper snapshots via `drizzle-kit generate`, deleting the orphaned file, and adding a no-op verification migration (0070). Made migration 0069 idempotent with IF EXISTS/IF NOT EXISTS guards for production safety. Updated CLAUDE.md with rules to prevent manual migration/journal editing and ensure snapshots are always generated. https://claude.ai/code/session_01JuVHpRPa974MKSHoXNGkgU * Update package-lock.json from npm install https://claude.ai/code/session_01JuVHpRPa974MKSHoXNGkgU * Preserve original migration tags and SQL to match production hashes Restores the original tag name (0068_cs2_major_simulator) and exact SQL content for migrations 0068 and 0069 so their hashes match what's already recorded in the production __drizzle_migrations table. Also fixes the snapshot id/prevId chain to use consistent tag-based identifiers. https://claude.ai/code/session_01JuVHpRPa974MKSHoXNGkgU --------- Co-authored-by: Claude <noreply@anthropic.com>
3 lines
165 B
SQL
3 lines
165 B
SQL
-- Verification migration: confirms drizzle migration chain is healthy.
|
|
-- This is a no-op migration that validates the migration system works end-to-end.
|
|
SELECT 1;
|