-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing collections fails because of View Collections #2044
Comments
I found the culprit. The view is actually evaluated after the collections insertion, but the problem is that the view query relies not on the collection entries but on their related record tables, which at the moment are synced at the last step of the import. I'll push a fix sometime later today and will update the tests. This could also explain reported issue in #2012. |
Should be fixed in v0.13.3 release. Note that in case of a view referencing another view the order of the imported collections still could matter because there is no easy way to partially validate the views (the view create query is either persisted or not). |
Excellent! Thanks for the quick fix! |
Importing Collections through JSON files on a clean pocketbase installation fails due to the data validations of the SQL request for View Collections.
The error it provides is it not being able to find the collection that you are looking for, even though it will be created by the JSON you provided.
A workaround I've been using is deleting my View Collections, importing, and then re-importing everything with the View Collections included.
I am guessing in situations where a View Collection requests data from another View Collection, that won't work. Maybe the SQL rules should be evaluated after all of the tables have been created?
Thanks for this amazing project!
The text was updated successfully, but these errors were encountered: