1

We're working on developing a proper deployment system for projects built on Craft, and wondering if there are any Craft specific tools built-in that can assist with generating database migrations, other than those included with Yii itself?

I have more questions, but we'll start here.

2
  • Yeah, covering quite a few topics worth their own answers. Split 'em up and I'll give it a go.
    – Brad Bell
    Oct 21 '14 at 0:02
  • @Brad Thanks Brad. I'll start here, and see where this leads us. ;) Oct 21 '14 at 0:08
1

Craft has it's own version of Yii's console app, yiic, in craft/app/etc/console/yiic.php and we have a migrate command that lets you create, view history, see new migrations, etc. for plugins as well as Craft itself.

We've extended the default migrate command to add Craft-specific features and remove some default Yii functionality that we don't want to support (i.e. down migrations).

You can see the available commands to run here: http://buildwithcraft.com/docs/plugins/migrations

1
  • Excellent. Thank you. I don't know how I missed this in the docs. I'll investigate this a bit, and ask more as needed. But real quick, the docs are geared toward plugin development (which is great) — is there similar documentation for migrating the main craft DB? Oct 21 '14 at 1:45

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.