Skip to content

Adding files during migration #3234

Closed Answered by ganigeorgiev
zjael asked this question in Q&A
Aug 31, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

The app instance is not accessible in the Go migrations at the moment (this was suggested before but for now I'm reluctant to allow it because users could easily misuse it especially when working with app.Dao() since it won't be part of the migration transaction).

As a workaround you can try to create a custom console command instead of a migration - https://pocketbase.io/docs/go-console-commands/.

Replies: 2 comments 2 replies

Comment options

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

Answer selected by zjael
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants