Hi!

I am working on a website and the specifications are build as we go along. For example, the most recent request was that a content type's fields have to be altered. There is already a lot of content on the website and we don't want to loose it.

I know that there is the possibility to export content types, views, etc. using Features and also that I can use .install files to alter the DB.

Is there a way to automatically create an .install file (or something similar) which will apply only the differences between the online version and the development one? Something like version control?

Thank you!

Comments

pixelsweatshop’s picture

That is what configuration management is for in D8 https://www.drupal.org/docs/8/configuration-management/managing-your-sit...

lucian.ilea’s picture

That is a great start! Thank you! I am still using Drupal 7 and I found that the Configuration Management module is similar to the CM in Drupal 8 core. I will give it a try!

Thanks again!

pixelsweatshop’s picture

Sorry, I misread your initial post. I thought you were using D8. In D7, the only real way to do this is through features, however, trying to apply features to existing content types won;t work as the content type in the live site will be stored in the DB and will override your feature. What you needed to do was start with features and always keep your stuff stored there. You could try stuffing your changes into a feature and reverting it to see if it will take and keep your content. But do it in a test environment first. I will let someone else to chime in as I kept my stuff in featured and never had to shoehorn it in later.

lucian.ilea’s picture

I have just installed the Configuration Management on my development and productions servers and played a little with it. It seems to do the trick so far. I can alter prety much anything, without affecting the existing content.

I am worried though about the fact that the module is still in alpha stage. Do you think I should?

Thank you!

pixelsweatshop’s picture

It's in alpha because D7 makes it really hard to do config management because of the architecture of core. D8 fixed that architecture so it could be done easily there. Always test, test, test before deploying though.

lucian.ilea’s picture

Thank you! I will! :-)