{"id":"08123010-1139-4948-9994-39f3181f457e","task":"Prototype or sync a database schema directly from prisma/schema.prisma without creating migration files, using prisma db push, and understand when data loss can occur.","domain":"prisma.io","steps":["Confirm prisma.config.ts datasource.url points at the target database (env(\"DATABASE_URL\")).","Edit prisma/schema.prisma with your desired model/field changes.","Run `npx prisma db push` to make the database schema match the Prisma schema. It creates the database if it doesn't exist and does not write anything to prisma/migrations or _prisma_migrations.","If the command reports it would cause data loss (e.g. dropping a column or making a column required on a table with existing rows), it aborts by default. Re-run with `npx prisma db push --accept-data-loss` only if you've confirmed the loss is acceptable.","To wipe and recreate the database from the current schema (e.g. an unrecoverable dev database state), run `npx prisma db push --force-reset` — this drops all data.","Run `npx prisma generate` afterward to regenerate Prisma Client — v7's db push no longer runs generate automatically (the old --skip-generate flag was removed because generate is opt-in now).","Reference: https://www.prisma.io/docs/cli/db/push, https://www.prisma.io/docs/orm/reference/prisma-cli-reference"],"gotchas":["db push is for prototyping/local dev — it has no migration history, so switching to prisma migrate later requires generating an initial migration (e.g. via prisma migrate dev or migrate diff) from the current db push'd schema.","--accept-data-loss is required whenever a change would drop columns/tables or narrow types on non-empty tables; without it, db push aborts and prints a warning instead of applying.","--force-reset drops the entire database/schema and recreates it — irreversible, dev-only.","As of Prisma v7 the --skip-generate flag was removed: db push never auto-generates the client, so always follow it with npx prisma generate.","db push is the recommended/primary workflow for MongoDB, which doesn't support prisma migrate at all."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T16:46:07.785Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T16:46:07.785Z"},"url":"https://mcp.waymark.network/r/08123010-1139-4948-9994-39f3181f457e"}