5

When there are updates to Craft, I perform them locally against a local database. The files are then committed to a repository.

I then use Capistrano to deploy the updated installation to various test environments (and eventually production), each of which have their own database.

My dilemma is that for the DB updates to run for Craft, I have to hit visit the control panel and initiate them. I need a programmatic solution so that I can ping a URL after the deployment is finished, and initiate the DB updates.

Is there already a way to do this or do I need to write a plugin that is a wrapper for craft()->updates->updateDatabase() that is triggered via a custom site route?

4

My dilemma is that for the DB updates to run for Craft, I have to hit visit the control panel and initiate them.

Currently true, but only if a new database migration has been introduced during the update. Otherwise, it should be seemless.

I need a programmatic solution so that I can ping a URL after the deployment is finished, and initiate the DB updates. Is there already a way to do this...

It is on our list to add support for an endpoint for deployment services that have a post-deployment hook specifically for situations like this one. (We could use it ourselves!)

| improve this answer | |
  • Hey Brad, has anything like this been introduced as yet? – michaelroper Jun 3 '16 at 9:05
  • @michaelroper not yet! – Brad Bell Jun 3 '16 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.