SQLSourceControl Database Revision is not being updated
Giorgi
Posts: 18 Bronze 3
After upgrading to SQL Source Control 5, extended property "SQLSourceControl Database Revision" is not being updated with "Commit" and "Get latest" commands
Comments
SQL Source Control 5 no longer uses the DB extended properties so that behavior is expected.
The "SQLSourceControl Database Revision" extended property was used for Migration scripts. Migration has been overhauled in version 5 and it no longer relies on this extended property.
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
But why then these extended properties appear in deployment scripts generated by SQL Compare command line?
Thank You,
What version of SQL Compare are you using?
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
I am using SQL Compare 11.6.7.2123
Thanks you,
Giorgi
At the end of the script there is a block with update of all of the 3 database extended properties
Thank you,
Giorgi
Does the same thing happen if you generate the script from the User Interface?
What type of source are you using? A live DB or scripts folder?
If it is a scripts folder do you have nay migration scripts?
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
With UI there is the same issue,
I am doing it with "Source ControlDirect from source control" for Source and Target, Comparing Head revision for source and some lower Revision for target
Thank you,
Giorgi
I have tested this in my lab, after updating SQL Source Control to version 5 and having updated the migration scripts, SQL Compare no longer scripts database extended properties.
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
What about the two other properties:
> SQLSourceControl Migration Scripts Location
> SQLSourceControl Scripts Location
Are these still used, or can they too be deleted?
Thanks
Peter
Those extended properties were only used for migrations v1, so if you're no longer using that then you're free to delete those extended properties.
Redgate Software
We have been using the extended property in order to determine what version an installed database is at, so our product bootstrap installer can upgrade the user to the right revision level. For example, if a customer is two releases behind, we can see they are at revision "A", and we know that "C" is current, so we run A_B and B_C upgrade packages to get them up to date.
Since we don't know what revision number changes are going to be until after they are committed, it would be very helpful if we could specify an extended property name somewhere and have the commit process update that extended property, similar to what was happening with the migration script system.
I think it would also help if the current revision level was displayed at all times somewhere in the UI, rather than just after the check-in. A good location could be following the database name on the Commit and Get Latest tabs.
Thanks for your feedback.
Could you please post your idea on our uservoice forum?
https://redgate.uservoice.com/forums/39 ... ce-control
This forum is monitored by the Product Management team who use it as an important source when deciding what features to add or to enhance in the tool.
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
I agree absolutely to timetrak_aw, Revision number is nice means to control at what point is production db.
But besides that, I tried to remove Revision extended property, but source control has done strange thing, after that, I saw all the old migration scripts in my "Get Latest" tab
So as I see our upgrade to SC 5 was something like half an upgrade, and some parts of logic in SC and SQL Compare think that they are working as old versions
Thank you