Press Ctrl / CMD + C to copy this to your clipboard.
Copied to clipboard
Flag this post as spam?
This post will be reported to the moderators as potential spam to be looked at
Topic author was deleted
Sep 17, 2014 @ 10:34
Keeping the Umbraco database in source control - tips?
Hi,
I'v developed a few sites with Umbraco now, often in a team of two. Our usual method of development has been to keep the database on a central server, and to source control only the code. This works okay when there's only two people (especially in Umbraco 7 where we can do more within VS and not in the browser).
However, the next project I'll be working on will use a bigger development team, so I'm starting to wonder whether the database itself will also need to be version controlled. I'm tempted by using SQL Server Express and to throw that up with the rest of the code, but I'm not sure how Team Foundation Server would handle merges on a database like that?
What solutions do other people use? Is TFS intelligent enough, or should we keep using a centralised database and hope for the best?
We at cogworks use usync, it uses the umbraco package manager code to generate xml files of data types, doc types and templates you can control what does and does not get written out. Then when teamcity builds out it also deploys these files and on the target server they are read and the doctypes, datatypes etc are created or updated, couple of things it never deletes and it will not handle content or media however I think there is an experimental version that does it. you can check it out http://our.umbraco.org/projects/developer-tools/usync
Thanks for your quick response! That looks interesting, I'll take a look. It makes sense to do it that way actually. I'm not too bothered about the content or media too much in the early stages, so it looks promising!
I've previously tried to use the Generate Scripts option via SSMS but as the script is stored in binary format, our source control tool of choice couldn't distinguish changes between files. I resorted to creating a console application which given a connection string, would script a database to disk using SSMO. This allowed me to store the script as a file format and encoding where changes could be differentiated be a source control tool.
One other option you could try which I haven't is to use a combination of uSync and uSync.ContentEdition. I've used uSync a few times and it works well. I haven't tried the content edition though. I'm guessing with this approach you'd be missing things like media and members.
Topic author was deleted
Keeping the Umbraco database in source control - tips?
Hi,
I'v developed a few sites with Umbraco now, often in a team of two. Our usual method of development has been to keep the database on a central server, and to source control only the code. This works okay when there's only two people (especially in Umbraco 7 where we can do more within VS and not in the browser).
However, the next project I'll be working on will use a bigger development team, so I'm starting to wonder whether the database itself will also need to be version controlled. I'm tempted by using SQL Server Express and to throw that up with the rest of the code, but I'm not sure how Team Foundation Server would handle merges on a database like that?
What solutions do other people use? Is TFS intelligent enough, or should we keep using a centralised database and hope for the best?
Thanks!
Ed,
We at cogworks use usync, it uses the umbraco package manager code to generate xml files of data types, doc types and templates you can control what does and does not get written out. Then when teamcity builds out it also deploys these files and on the target server they are read and the doctypes, datatypes etc are created or updated, couple of things it never deletes and it will not handle content or media however I think there is an experimental version that does it. you can check it out http://our.umbraco.org/projects/developer-tools/usync
Regards
Ismail
Comment author was deleted
Hi Ismail,
Thanks for your quick response! That looks interesting, I'll take a look. It makes sense to do it that way actually. I'm not too bothered about the content or media too much in the early stages, so it looks promising!
Thanks, Ed
Hi Ed,
I've previously tried to use the Generate Scripts option via SSMS but as the script is stored in binary format, our source control tool of choice couldn't distinguish changes between files. I resorted to creating a console application which given a connection string, would script a database to disk using SSMO. This allowed me to store the script as a file format and encoding where changes could be differentiated be a source control tool.
One other option you could try which I haven't is to use a combination of uSync and uSync.ContentEdition. I've used uSync a few times and it works well. I haven't tried the content edition though. I'm guessing with this approach you'd be missing things like media and members.
Thanks, Dan.
Hello,
You could also have a look at uMigrations.
Jeroen
is working on a reply...