-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: mssql_lbpro_master_changelog_no_catalog.xml
-- Ran at: 11/15/19 1:56 PM
-- Against: datical_login@jdbc:sqlserver://3.219.82.47:1433;sslProtocol=TLS;jaasConfigurationName=SQLJDBCDriver;statementPoolingCacheSize=10;serverPreparedStatementDiscardThreshold=10;enablePrepareOnFirstPreparedStatementCall=false;fips=false;socketTimeout=0;authentication=NotSpecified;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustStoreType=JKS;trustServerCertificate=false;TransparentNetworkIPResolution=true;serverNameAsACE=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;queryTimeout=-1;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=false;databaseName=proCatalog;columnEncryptionSetting=Disabled;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite;
-- Liquibase version: 3.8.2-DAT-3598-SNAPSHOT
-- *********************************************************************
USE proCatalog ;
GO
-- Lock Database
UPDATE DATABASECHANGELOGLOCK SET LOCKED = 1 , LOCKEDBY = 'Erzsebet-PC (192.168.0.34)' , LOCKGRANTED = '2019-11-15T13:56:05.17' WHERE ID = 1 AND LOCKED = 0
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::3::dropSynonym-proCatalog::Liquibase Pro User
DROP SYNONYM [ privateSynonymOnTable ]
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '3::dropSynonym-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 17 , '8:82a49a1df297832e0e5c014c7dba5d97' , 'dropSynonym synonymName=privateSynonymOnTable' , '' , 'EXECUTED' , NULL , 'dropprivatesynonym,lbl-syn' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::4::dropPublicSynonym::Liquibase Pro User
DROP SYNONYM [ publicSynonymOnTable ]
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '4::dropPublicSynonym' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 18 , '8:e46072543816816b16fff4fdded56068' , 'dropSynonym synonymName=publicSynonymOnTable' , '' , 'EXECUTED' , NULL , 'droppublicsynonym,lbl-syn' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::2::dropView-proCatalog::Liquibase Pro User
DROP VIEW persons_view
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '2::dropView-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 19 , '8:6b7030bf90f5164b6f261814d4180ade' , 'dropView viewName=persons_view' , '' , 'EXECUTED' , NULL , 'dropview,lbl-view' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::2::dropProc-proCatalog::Liquibase Pro User
DROP PROCEDURE printHelloWorld
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '2::dropProc-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 20 , '8:b8e93c02e6d2ba004261da39c7a7b578' , 'dropProcedure procedureName=printHelloWorld' , '' , 'EXECUTED' , NULL , 'dropprocedure,lbl-proc' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::2::rollbackFunction-proCatalog::Liquibase Pro User
USE [ proCatalog2 ]
GO
CREATE FUNCTION [ dbo ].[ emailFunction ]()
RETURNS VARCHAR ( 100 )
AS
BEGIN
DECLARE @ rtEmail VARCHAR
SET @ rtEmail = 'random@datical.com'
RETURN @ rtEmail
END
GO
USE [ proCatalog2 ]
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '2::rollbackFunction-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 21 , '8:ae8e2abb341cf5fce706d5a69deb3387' , 'sql; createFunction functionName=emailFunction; sql' , '' , 'EXECUTED' , NULL , 'rollbackfunction,lbl-func' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::2::dropFunc-proCatalog::Liquibase Pro User
DROP FUNCTION emailFunction
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '2::dropFunc-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 22 , '8:7b7e55cacd71d5affda392508f3cb17a' , 'dropFunction functionName=emailFunction' , '' , 'EXECUTED' , NULL , 'dropfunction,lbl-func' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::3::disableTrigger-proCatalog::Liquibase Pro User
DISABLE TRIGGER table_trigger ON primary_table
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '3::disableTrigger-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 23 , '8:b16d51e844e972a72f45809a9b7b8336' , 'disableTrigger tableName=primary_table, triggerName=table_trigger' , '' , 'EXECUTED' , NULL , 'disabletrigger,lbl-trig' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::4::enableTrigger-proCatalog::Liquibase Pro User
ENABLE TRIGGER table_trigger ON primary_table
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '4::enableTrigger-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 24 , '8:780e362d158fe05bf9617a86b2b8f6d9' , 'enableTrigger tableName=primary_table, triggerName=table_trigger' , '' , 'EXECUTED' , NULL , 'enabletrigger,lbl-trig' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::5::renameTrigger-proCatalog::Liquibase Pro User
sp_rename 'proCatalog.table_trigger' , 'table_trigger_deux'
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '5::renameTrigger-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 25 , '8:916bb9a6ced89805b4c2a946d7a62496' , 'renameTrigger newTriggerName=table_trigger_deux, oldTriggerName=table_trigger' , '' , 'EXECUTED' , NULL , 'renametrigger,lbl-trig' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::6::dropCatalogTrigger-proCatalog::Liquibase Pro User
DROP TRIGGER db_trigger
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '6::dropCatalogTrigger-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 26 , '8:2deca539397c8a4d5b42c5c2c60b2fd8' , 'dropTrigger triggerName=db_trigger' , '' , 'EXECUTED' , NULL , 'dropcatalogtrigger,lbl-trig' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::7::dropTrigger-proCatalog::Liquibase Pro User
DROP TRIGGER table_trigger_deux
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '7::dropTrigger-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 27 , '8:e3dd925e4c1d8c5da328726d092945ec' , 'dropTrigger triggerName=table_trigger_deux' , '' , 'EXECUTED' , NULL , 'droptrigger,lbl-trig' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::4::dropCC-proCatalog::Liquibase Pro User
ALTER TABLE Persons DROP CONSTRAINT chk_Person
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '4::dropCC-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 28 , '8:bdcd47644f81e75b61649c57adf9817a' , 'dropCheckConstraint constraintName=chk_Person, tableName=Persons' , '' , 'EXECUTED' , NULL , 'dropcheckconstraint,lbl-cc' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::namespaceDatical::Datical (generated)
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID , TAG ) VALUES ( 'namespaceDatical' , 'Datical (generated)' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 29 , '8:d7f6cfe3454adb7c8f76de668dfc091e' , 'tagDatabase' , '' , 'EXECUTED' , NULL , 'namespacetest' , '3.8.2-DAT-3598-SNP' , '3847767930' , 'namespaceTest' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::namespaceAppdba::addCC-proCatalog::Liquibase Pro User
ALTER TABLE [ Persons ] ADD CONSTRAINT [ chk_Person ] CHECK (([ P_Id ] > ( 0 ) AND [ City ] = 'Austin' ))
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( 'namespaceAppdba::addCC-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 30 , '8:5e664002fca240883e6728a3078023a4' , 'addCheckConstraint constraintName=chk_Person, tableName=Persons' , '' , 'EXECUTED' , NULL , 'namespacetest' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::namespaceFunction::createFunction-proCatalog::Liquibase Pro User
CREATE FUNCTION [ dbo ].[ emailFunction ]()
RETURNS VARCHAR ( 100 )
AS
BEGIN
DECLARE @ rtEmail VARCHAR
SET @ rtEmail = 'random@datical.com'
RETURN @ rtEmail
END
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( 'namespaceFunction::createFunction-proCatalog' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 31 , '8:bfdb067647d26bce7755de59000a2440' , 'createFunction functionName=emailFunction' , '' , 'EXECUTED' , NULL , 'namespacetest' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::1::columnOrder123-PROSCHEMA::Liquibase Pro User
CREATE TABLE COLUMN_ORDER ( COLUMN1 varchar ( 20 ), COLUMN2 varchar ( 20 ), COLUMN3 varchar ( 20 ))
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '1::columnOrder123-PROSCHEMA' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 32 , '8:1f702550fb575ee944eabf8261565651' , 'createTable tableName=COLUMN_ORDER' , '' , 'EXECUTED' , NULL , 'urldb' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Changeset mssql_lbpro_master_changelog_no_catalog.xml::1::columnOrder231-PROSCHEMA::Liquibase Pro User
CREATE TABLE column_order ( column2 varchar ( 20 ), column3 varchar ( 20 ), column1 varchar ( 20 ))
GO
INSERT INTO DATABASECHANGELOG ( ID , AUTHOR , FILENAME , DATEEXECUTED , ORDEREXECUTED , MD5SUM , DESCRIPTION , COMMENTS , EXECTYPE , CONTEXTS , LABELS , LIQUIBASE , DEPLOYMENT_ID ) VALUES ( '1::columnOrder231-PROSCHEMA' , 'Liquibase Pro User' , 'mssql_lbpro_master_changelog_no_catalog.xml' , GETDATE (), 33 , '8:39f420962f02a3a1d0ec2f2548b628ad' , 'createTable tableName=column_order' , '' , 'EXECUTED' , NULL , 'refurldb' , '3.8.2-DAT-3598-SNP' , '3847767930' )
GO
-- Release Database Lock
UPDATE DATABASECHANGELOGLOCK SET LOCKED = 0 , LOCKEDBY = NULL , LOCKGRANTED = NULL WHERE ID = 1
GO