Replies: 3 comments 3 replies
-
Hey @JesperWe — I think this is something that we can likely add to Payload. Good call. I will add this to the roadmap and we should be able to get to it shortly! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yep and integrated support for GIS would be awesome |
Beta Was this translation helpful? Give feedback.
3 replies
-
Update here. PostGIS / Point field support will be very soon, check the comment from @ainsleyclark #8644 (comment) in the related discussion for this! As soon as Drizzle's PR will be released I think we can also merge this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the Bug
The docs state about
beforeSchemaInit
:The ability to perserve existing database structure is however limited to databases that have tables that are not to be managed by Payload.
If the DB has SQL views defiend, Drizzle will attempt to delete those views and there is no way in the
PostgresSchema
type to add views, it only supports Enums, Relations and Tables.Drizzle itself supports adding
pgView
, but that feature does not seem to be propagated.Link to the code that reproduces this issue
https://github.com/payloadcms/payload/blob/beta/packages/drizzle/src/postgres/types.ts
Reproduction Steps
One easy way to reproduce is to enable the very popular PostGIS extension in a Postgres database
and then try to enable Payload for that database. The extra
spatial_ref_sys
table required by PostGIS can be handled inbeforeSchemaInit
but the required views can not. Drizzle will try to delete them, which will fail.Which area(s) are affected? (Select all that apply)
db-postgres
Environment Info
Binaries:
Node: 20.11.0
npm: 10.8.2
Yarn: 1.22.19
pnpm: 9.12.2
Relevant Packages:
payload: 3.0.0-beta.123
next: 15.0.1
@payloadcms/db-mongodb: 3.0.0-beta.123
@payloadcms/db-postgres: 3.0.0-beta.123
@payloadcms/graphql: 3.0.0-beta.123
@payloadcms/next/utilities: 3.0.0-beta.123
@payloadcms/richtext-lexical: 3.0.0-beta.123
@payloadcms/richtext-slate: 3.0.0-beta.123
@payloadcms/translations: 3.0.0-beta.123
@payloadcms/ui/shared: 3.0.0-beta.123
react: 19.0.0-rc-65a56d0e-20241020
react-dom: 19.0.0-rc-65a56d0e-20241020
Beta Was this translation helpful? Give feedback.
All reactions