planetScaleMode = true
is not preserved during db pull
#9253
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
topic: re-introspection
topic: relationMode
formerly `referentialIntegrity`
Milestone
Bug description
I'm trying to find a way to support a Postgres server that uses Citus, a distributed Postgres extension. Citus supports
FOREIGN KEY
constraints on distributed tables, but they can be extremely cumbersome to set up (especially when they involve "reference" tables with circular relationships). So I'm trying to make Prisma anddb pull
work without anyFOREIGN KEY
constraints.(This bug report was requested by @janpio on Slack.)
How to reproduce
Set up a PostgreSQL connection to a database with no declared
FOREIGN KEY
constraints.Run
prisma db push
to migrate the schemaRun
prisma db pull
.Result: The datasource will lose
planetScaleMode = true
:(The schema also looses all relations, but that is covered in Re-introspection should not remove relations when foreign keys are not allowed #9147)
Expected behavior
Prisma should preserve
planetScaleMode = true
whenprisma db pull
is run.Prisma information
See above.
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: