Baselining 0001 caused rethus_code/rethus_validated to never be added
automatically. The SQL already uses IF NOT EXISTS so it is safe to deploy
on every fresh container even if the columns already exist.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- entrypoint.sh: resolve --applied 0000 and 0001 before deploying,
so prisma skips them and only runs 0002 (message_logs) and 0003 (suggestions)
- migration 0003: CREATE TABLE IF NOT EXISTS suggestions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rewrite 0000_init with IF NOT EXISTS on all tables, indexes and enums;
wrap FK constraints in DO/EXCEPTION blocks so re-runs never fail
- Add missing suggestions table to init migration
- Add migration 0002 to create message_logs table (IF NOT EXISTS)
- Add entrypoint.sh: runs prisma migrate deploy before starting the server
- Update Dockerfile to copy entrypoint.sh and use it as CMD
- Add prisma:migrate script to package.json for manual runs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>