cedric
08/26/2021, 4:16 PM--create-only migrate flag that does a dry run for schema migrations but i’m wondering if there’s also a --dont-delete-tables-you-dont-know-about-pretty-please flag as well?Dominic Hadfield
08/26/2021, 5:00 PMcedric
08/26/2021, 5:02 PMcedric
08/26/2021, 5:03 PMDominic Hadfield
08/26/2021, 5:04 PMDominic Hadfield
08/26/2021, 5:05 PMcedric
08/26/2021, 6:23 PMcedric
08/26/2021, 6:23 PMcedric
08/26/2021, 6:23 PMcedric
08/26/2021, 6:50 PM@prisma/migrate readme to a before and after hook for migrations. i’m wondering if we could use that to do something like this:
1. run an introspection to an introspected.prisma file
2. compare the tables and fields under introspection with the ones in our primary schema.prisma
3. merge our schema.prisma with the remaining tables from introspected.prisma tables (appending @@ignore inside each of those tables)
4. running the migration against the merged prisma schema filecedric
08/26/2021, 6:51 PMRyan
08/27/2021, 6:02 AMschema.prisma.
There’s a feature request for the same that you can add a 👍 on and your use case as well.
For now, I would suggest using introspection as you have tables not just being managed by Prisma.cedric
08/27/2021, 4:12 PMcedric
08/27/2021, 4:13 PMcedric
08/27/2021, 4:14 PM?schema=my_schema parameter seems to be undocumented in both the prisma docs and the libpq url scheme that the prisma docs point tocedric
08/27/2021, 4:14 PMcedric
08/27/2021, 4:17 PMcedric
08/27/2021, 4:19 PMschema.prisma