2 Commits

Author SHA1 Message Date
Artsiom Kharytonchyk 4a9dd8246a fix(db): create empty migrations next to the schema (#3401)
`db:migrate:empty` built a cwd-relative `prisma/migrations` path, which is the
pre-monorepo location. The schema — and the only migrations directory with a
`migration_lock.toml` — moved to packages/civitai-db-schema, so new migrations
landed in a directory Prisma no longer reads. Roughly a third of the migrations
added since May 2026 ended up there.

Derive the directory from package.json's `prisma.schema` so it follows the schema
if it moves again, and anchor on the script's own location so the result no longer
depends on the cwd it was invoked from.

Existing migrations in the root directory are left alone; consolidating them is a
separate call.
2026-07-28 16:05:36 -06:00
Justin Maier 4e9ae5574d Add commentCount migration sql and ability to do db:migrate:empty 2025-10-17 17:18:57 -06:00