You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rticles Documents that are used as templates by One Click Orgs are currently shipped with the app as YAML files. Rails' seed.db is used to load these documents into the database for subsequent use by the app as templates.
If the YAML file is updated, the administrator of an instance of OCO needs to manually re-run the DB seed task in order for the template in the database to be updated to the latest version.
It would be better if this process was automated somehow.
The text was updated successfully, but these errors were encountered:
I don't think rake db:seed is really supposed to be run multiple times on a single database. So using it to update our Document is inappropriate. We can still use it for initially preparing the database when it is created, but updates should be handled elsewhere.
Two possible places: a custom script invoked by our Capistrano deployment recipe (this would take care of deploys, but wouldn't help a developer keep their development environment up-to-date when pulling in the latest code); at runtime, check if the document in DB matches the document on disk in the YAML file, and update if necessary (no manual interaction required, but would set off a potentially slow operation in production).
How can we check if the document in DB is out-of-date compared to the YAML version? Manual versioning (e.g. the developer changes the title attribute of the document when the document changes) is an easy option to implement. More sophisticated might be to store a hash of the YAML file with the Document record in the DB, and use that to check if the YAML has been changed since the Document record was created.
Rticles Documents that are used as templates by One Click Orgs are currently shipped with the app as YAML files. Rails'
seed.db
is used to load these documents into the database for subsequent use by the app as templates.If the YAML file is updated, the administrator of an instance of OCO needs to manually re-run the DB seed task in order for the template in the database to be updated to the latest version.
It would be better if this process was automated somehow.
The text was updated successfully, but these errors were encountered: