#!/bin/bash # One-time script to baseline existing production database with migration history # Run this ONCE on production server: docker exec hoerdle sh scripts/baseline-migrations.sh echo "🔧 Baselining migration history for existing database..." # Mark all existing migrations as applied npx prisma migrate resolve --applied "20251122121934_add_specials" npx prisma migrate resolve --applied "20251122140952_add_specials_real" npx prisma migrate resolve --applied "20251123012306_add_special_curator" npx prisma migrate resolve --applied "20251123012308_add_special_song_model" npx prisma migrate resolve --applied "20251123020226_add_special_scheduling" npx prisma migrate resolve --applied "20251123083856_add_rating_system" npx prisma migrate resolve --applied "20251123140527_add_subtitles" npx prisma migrate resolve --applied "20251123181922_add_release_year" npx prisma migrate resolve --applied "20251123204000_fix_cascade_delete" npx prisma migrate resolve --applied "20251124182259_add_exclude_from_global" npx prisma migrate resolve --applied "20251124231438_add_genre_active_field" npx prisma migrate resolve --applied "20251125101602_add_news_model" npx prisma migrate resolve --applied "20251128131405_add_i18n_columns" npx prisma migrate resolve --applied "20251128132806_switch_to_json_columns" echo "✅ Baseline complete! Restart the container to apply migrations normally."