Skip to content
Discussion options

You must be logged in to vote

I would not manually create _prisma_migrations. The supported version of that idea is to baseline the existing database with prisma migrate resolve --applied.

P3005 is Prisma Migrate saying: "this database is not empty, but I have no migration history for it yet." That is expected for an existing production/tenant database.

For your case, since you intentionally do not want Prisma to model the legacy tables, I would use a no-op baseline migration for each existing tenant DB, then let Prisma manage only the new tables from that point forward.

Rough shape:

mkdir -p prisma/migrations/0_existing_database_baseline
printf '%s\n' '-- Baseline existing tenant database. Legacy tables are intention…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rjmccluskey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants