Dev to Production procedure

Looking to see how others manage releasing changes to production environment.

I have a dev version that is under source control (Git). I make changes in the dev environment, commit them and then release the code to production and perform a Repair & Rebuild.

This works for minor tweaks but when say I add a new field to the contacts module it fails. The reason is that for each new field a record seems to be inserted into the ‘fields_meta_data’ table. The Repair & Rebuild does not seem to insert this record after I’ve released the new code version containing the new field. This leads to a “PHP Fatal error: Smarty error”.

To fix it I manually insert the missing row and then do another Repair & Rebuild.

What is best practice for releasing changes from dev to live?

Thanks

I would also like to know the answer to this as I am having the same issue. The only way I’ve overcome this is to just have separate environments and promote only the database. Everytime I push to git and pull elsewhere, there are custom files which appear to be broken.

Do have the custom/modules directory under version control? (should be)

I don’t have a problem with the php files using git.

I can commit & push on dev and then pull on live and perform a ‘Quick Repair and Rebuild’ (remembering to scroll to the bottom to check if any database alterations need running, I have forgotten in the past and that caused issues).

That all works as long as I have not added a new field. That’s when I have to manually add the new record into the db table myself.

What I was trying to say was completely lost while trying to convey the logic… We are experiencing the same thing. Git works fine, but if I commit an instance I’ve been working on and clone it elsewhere, I have to repair and rebuild – essentially the same problem that you are experiencing. The only times I do this mostly is when I am promoting environments, which of course means new fields and features that get screwed up along the way… So, outside of custom module code that I may screw up at 2 AM, I just setup separate environments and promote through them gradually.