managarten/services/mana-media/apps/api/src
Till JS 64b8ab30ad fix(mana-media): commit initial schema migration + run on startup
The media schema/tables were never created on fresh deploys because
mana-media only shipped a `db:push` script and nothing ever ran it
in the container. Result: every upload returned 500 the moment a
new environment came up (just hit prod again on mana.how).

- Add `db:generate` + `db:migrate` scripts and a migrate.ts runner
- Generate the initial migration covering media/media_references/
  media_thumbnails (matches what was already on local + prod, which
  were stamped manually so the migrator skips on existing deploys)
- Call runMigrations() at startup in src/index.ts so future fresh
  containers self-bootstrap. Idempotent — drizzle tracks state in
  drizzle.__drizzle_migrations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 02:51:41 +02:00
..
db fix(mana-media): commit initial schema migration + run on startup 2026-04-10 02:51:41 +02:00
routes fix(mana-auth) + chore: rewrite /api/v1/auth/login JWT mint, remove Matrix stack 2026-04-08 16:32:13 +02:00
services fix(mana-auth) + chore: rewrite /api/v1/auth/login JWT mint, remove Matrix stack 2026-04-08 16:32:13 +02:00
constants.ts refactor(mana-media): migrate from NestJS to Hono/Bun 2026-03-28 18:12:42 +01:00
db.ts refactor(mana-media): migrate from NestJS to Hono/Bun 2026-03-28 18:12:42 +01:00
index.ts fix(mana-media): commit initial schema migration + run on startup 2026-04-10 02:51:41 +02:00