Extended properties to track version control revision number
akashkumar
Posts: 2
We have automated builds that get triggered from Jenkins on every database change check-in.
Jenkins calls SQL Compare command line which generates the deployment change script and then deploys all the changes to a SQL build instance. In the automated builds, we do not see the extended properties for version control revision number being set.
When we use SQL Compare UI and generate the script manually, it generates the script to add/update version control revision number which looks something like:
DECLARE @RG_SC_VERSION BIGINT
SET @RG_SC_VERSION = 1670
IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL))
EXEC sp_dropextendedproperty N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL
EXEC sp_addextendedproperty N'SQLSourceControl Database Revision', @RG_SC_VERSION, NULL, NULL, NULL, NULL, NULL, NULL
GO
Is there a command line parameter that needs to be passed in to SQL Compare command line to generate the code to update version control revision number extended property? I looked at the documentation for SQL Compare command line and did not find anything there. Am I missing something?
Any help would be appreciated. Thanks!
Jenkins calls SQL Compare command line which generates the deployment change script and then deploys all the changes to a SQL build instance. In the automated builds, we do not see the extended properties for version control revision number being set.
When we use SQL Compare UI and generate the script manually, it generates the script to add/update version control revision number which looks something like:
DECLARE @RG_SC_VERSION BIGINT
SET @RG_SC_VERSION = 1670
IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL))
EXEC sp_dropextendedproperty N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL
EXEC sp_addextendedproperty N'SQLSourceControl Database Revision', @RG_SC_VERSION, NULL, NULL, NULL, NULL, NULL, NULL
GO
Is there a command line parameter that needs to be passed in to SQL Compare command line to generate the code to update version control revision number extended property? I looked at the documentation for SQL Compare command line and did not find anything there. Am I missing something?
Any help would be appreciated. Thanks!
Comments