Version Control Database (Sitecore)

I just read the following SO post;

You control the raw data of your databases

We work with Sitecore and usually connect 3 standard databases to our MSSQL server. We have a database of Core, Master and Web. In the process of developing various templates for the Sitecore backend, we all use the same database and simply publish our changes to the database using Sitecore CMS. When, for example, I create a datatemplate, my colleague will see that the same data pattern appears when it updates its โ€œcontent treeโ€. From what I read in the post linked above, database management is required if you have multiple versions of the source code with different databases. Should our databases be brought under source control? Looking at this, knowing that Sitecore is actually processing the publication of elements in different databases, etc., And we all work in the same database through Sitecore CMS, I think that this will not be needed. I'm curious if there are any advantages to still putting databases under version control.

+4
source share
2 answers

Sitecore 6 introduced a very cool feature called "Elements Serialization". No need to store files of the entire database under source control. You can only store serialized versions of the necessary elements. These are simple text files on your file system.

Check out this Alex blog post for more details.

+5
source

The message you are referring to and subsequent messages are more suitable for custom applications where you "own" the database. those. You have created tables, stored procedures, views, etc. I would agree that if you created the database, then your schema should be in your original control. However, in the case of the Sitecore website, you do not โ€œownโ€ the Sitecore database schema, and therefore you do not need to have it in your original control. (I would hope Sitecore has a source control scheme, p)

So, you do not own a real database schema and should not have it in the initial control, but what about the templates and other elements created for your Sitecore website?

For Sitecore elements in your solution, you need to have a clear idea of โ€‹โ€‹ownership of them. The elements and templates that come with Sitecore do not belong to you, and therefore you should not manage them in your version control system. However, the templates that you and your team create must be in the original management!

To get specific Sitecore elements in Source control, you can use the built-in Sitecore serialization features that Ian talked about. You can also use a tool, such as Team Development for Sitecore , to automate this process and help you automatically build and deploy your items between environments.

+2
source

All Articles