Partially Source Controlled
RMD
Posts: 18
I have several projects that are add-ons to a 3rd party application. This 3rd party application has a very large database, and many customers want my add-ons to have their schema/data in the same database as the 3rd party application.
This creates a problem for SQL Source Control, as adding a database to source control appears to be an all-or-nothing thing.
Aside from just manually using SQL Compare with a scripts folder, is there a way to utilize SQL Source Control without having to add 100% of the database schema into source control?
This creates a problem for SQL Source Control, as adding a database to source control appears to be an all-or-nothing thing.
Aside from just manually using SQL Compare with a scripts folder, is there a way to utilize SQL Source Control without having to add 100% of the database schema into source control?
Comments
Something that immediately springs to mind (and you'll have to judge whether this would work for you) is to use filters.
You will have to link the database to source control, but before committing your schema objects, filter out the ones you do not want to commit.
This can be done by schema or object name, with/without wildcards. So it depends on how your database is structured as to how easy this is.
The filters are committed to your version control system too, so these can be shared among your database developers using SQL Source Control.
I hope this helps, and let me know if you need help in settings this up.
Regards
Chris
SQL Source Control
Red Gate Software
Like Chris mentioned, filters worked great for us. If you already have things organized by schema, it makes it tons easier.
Is there a way to not have to add the entire database? This 3rd party database has tens of thousands of objects.
Whilst it is true that the database is linked to source control, you would only be committing/retrieving the objects that satisfies your filter.
We don't automatically commit your entire database when you link, so as long as you apply the filter before your first commit, then you should see the behaviour you desire.
Regards
Chris
SQL Source Control
Red Gate Software