db-postgres: public schema is hard coded in migration steps #4818
Replies: 4 comments 2 replies
-
+1 Also need to use another schema than public. |
Beta Was this translation helpful? Give feedback.
-
Searched for a possibility to do this as well. What I found and tried:
|
Beta Was this translation helpful? Give feedback.
-
The current postgres adapter only has support for the We'd need to add an additional configuration option for the schema name to the adapter, then make sure all of our touchpoints with the DB are properly scoped to the specified schema. Moving this to a discussion as a feature request. |
Beta Was this translation helpful? Give feedback.
-
PR open here: #5047 |
Beta Was this translation helpful? Give feedback.
-
Link to reproduction
No response
Describe the Bug
I try to use db-postgres with another schema then
public
by using a connectionstring with schema provided but I only get tables created in public schema.I am lacking the possibility to set specific schema for migrations and I also see some hard-coded references to public schema
public
only if schema are not set in connectionstring?To Reproduce
npx create-payload-app@latest
blank
project templateDATABASE_URI=postgres://myuser:mypw@127.0.0.1:5432/mypayloaddb?schema=notpublicschema
Excepting
payload tables to be created in database
mypayloaddb
and schemanotpublicschema
Actual
payload tables to be created in database
mypayloaddb
and schemapublic
Payload Version
^2.0.0
Adapters and Plugins
db-postgres: 0.2.1
Beta Was this translation helpful? Give feedback.
All reactions