Hi all,
We are using Liquibase 3.5.3 with Maven 3.3.0 and Eclipse 4.5.2. Everything works and we can successfully run a Liquibase build with maven to our Sybase databases.
However, for whatever reason, we can not get the createProcedure to work in a <changeSet>. Does anyone have a working template of createProcedure against a Sybase database?
We can get the procedure to create by using just simple <sql> elements : The following does work...
- <changeSet author="adym.lincoln@..." id="lbTestLiquibase-1.0.0">
- <sql>
- use our_db
- </sql>
- <sql>
- if exists(select * from sysobjects where name = 'lbTestLiquibase' and type = 'P') drop procedure lbTestLiquibase
- </sql>
- <sql splitStatements="true" endDelimiter=";" stripComments="false"><![CDATA[
- if exists(select * from sysobjects where name = 'lbTestLiquibase' and type = 'P') drop procedure lbTestLiquibase
- ;
- CREATE PROCEDURE dbo.lbTestLiquibase
- as
- BEGIN
- declare @status int
- declare @message varchar(255)
- declare @error int
- select 'Version [1.0.1]' as version
- return 0
- Error_Exit:
- select @message
- return @status
- END
- ;
- ]]>
- </sql>
The following does NOT work :
- <changeSet author="adym.lincoln@libertymutual.com" id="lbTestLiquibase-1.0.0">
- <sql>
- use our_db
- </sql>
- <sql>
- if exists(select * from sysobjects where name = 'lbTestLiquibase' and type = 'P') drop procedure lbTestLiquibase
- </sql>
- <createProcedure
- dbms="Sybase"
- encoding="utf8"
- procedureName="lbTestLiquibase"
- relativeToChangelogFile="true">
- CREATE PROCEDURE dbo.lbTestLiquibase
- as
- BEGIN
- declare @status int
- declare @message varchar(255)
- declare @error int
- select 'Version [1.0.0]' as version
- return 0
- Error_Exit:
- select @message
- return @status
- END
- </createProcedure>
- </changeSet>
Things I've tried :
- Adding catalogName and schemaName to the createProcedure...
- <createProcedure
- dbms="Sybase"
- encoding="utf8"
- procedureName="lbTestLiquibase"
- relativeToChangelogFile="true"
- schemaName="dbo">
- <createProcedure
- catalogName="our_db"
- dbms="Sybase"
- encoding="utf8"
- procedureName="lbTestLiquibase"
- relativeToChangelogFile="true"
- schemaName="dbo">
tia,
adym