Skip to content

Extending PayloadCMS Database Schema with Custom Types (e.g., tsvector) #7472

Answered by r1tsuu
D0nte53 asked this question in Q&A
Discussion options

You must be logged in to vote

The possible API for that is described here #4297 (reply in thread) as 3rd option from @DanRibbens
I added mine suggestion too. I think it's really important to be able to customize the generated schema, not always you're fine with the generated variant.

Still, you can just completely ignore the schema push workflow via db.push: false and just use migrations workflow in the development as well. You create a migration -> add a change to the created migration file (for example tsvector type, or adding a custom table via CREATE TABLE) -> migrate.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@D0nte53
Comment options

Answer selected by D0nte53
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