- <changeSet id="tag-${build.number}" runOnChange="true" author="me">
- <tagDatabase tag="${build.number}"/>
- </changeSet>
Re : "runalways" changesets seem to break rollback functionality
Re : Announcing DB-Manul, a Liquibase fork for continuing and enhancing Liquibase
Bingo, that was the cause. I also verified the other JDBC drivers and changed the pom.xml so that compatible versions are used now. On my test VM, all embedded OSS RDBMS + MariaDB + PostgreSQL are working :) I will verify the rest (including commercial RDBMS) later when I get access to my primary machine again.
Cheers,
Andreas
P.S. This thread is getting a little lengthy, shall we move to the Developer's subforum and create topics for new sub-tasks?
Re : "runalways" changesets seem to break rollback functionality
- Update to build 1
- Update to build 2
- Update to build 3
- Rollback to build 1
- Update to build 3
Re : "runalways" changesets seem to break rollback functionality
- <rollback>
- delete from liquibasechangelog where ID > 'tag-${build.number}' and AUTHOR= 'me' and FILENAME ='<your-changelog-file-here>'
- </rollback>
Re : Announcing DB-Manul, a Liquibase fork for continuing and enhancing Liquibase
Re : Data Migration between environments
Hi,
Please can you assist, in the same query. We are also having the sql files and wanted to convert the liquibase format.
How can we do it.
Thanks
Rupesh
Re : Translator from MySQL to liquibase
Re : Translator from MySQL to liquibase
Re : Translator from MySQL to liquibase
Re : "runalways" changesets seem to break rollback functionality
Re : Translator from MySQL to liquibase
Re : Data Migration between environments
Hi,
Please can you reply urgently, we need assistance on it.
Thanks
Rupesh
Re : Translator from MySQL to liquibase
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Unable to tag the database using Liquibase for future rollback
I am trying to tag the database for future rollback using but getting below error:
Applying updates to the database. This may take a few minutes ... Unexpected error running Liquibase: Error parsing line 12 column 6 of ppsdb/ebidb_lb_upgrade_c43_sql_1.xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'sql'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog/1.9":modifySql}' is expected.
Here is my changeSet file:
cat ebidb_lb_upgrade_c43_sql_1.xml
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet author="avnish_plsql_upgrade" id="1">
<tagDatabase tag="version_1.3"/>
<sql
stripComments="false"
>
create table test (id number);
</sql>
</changeSet>
</databaseChangeLog>
When I am removing <tagDatabase> tag from file, I am not getting any error. It is only when I am adding this tag, I am getting above error. Please let me know, if I am missing any thing or making any mistake here.
Triggers, Procs and Functions not working in H2
Hi, Triggers/SQL Types/Procedures not working in H2. Liquibase version :3.5.3 Samples in my sql file ----------------------------- create or replace PROCEDURE myProc END myProc; / Trigger:- --------- CREATE OR REPLACE TRIGGER my_trigger After INSERT OR UPDATE ON sample_TBL end; / Tried adding endDelimiter like below:- <sqlFile endDelimiter="\n/\s*\n|\n/\s*$" path="src/main/resources/mysqlFile.sql" splitStatements="false" /> But getting the error like below:- Reason: liquibase.exception.DatabaseException: Syntax error in SQL statement "CREATE OR REPLACE TRIGGER [ERROR] / "; expected "., INSTEAD, BEFORE, AFTER"; SQL statement: The same error exists for SQL types and function creation.Please help.
Thanks.
Do not create Databasechangelog and Databasechangeloglock tables?
java -jar liquibase-core-3.4.2.jar update
Here is the directory structure.
-rw-r--r-- 1 lok362 COF\Domain Users 673 Jul 14 06:39 master.xml
-rw-r--r-- 1 lok362 COF\Domain Users 2065116 Jul 14 06:41 liquibase-core-3.4.2.jar
-rw-r--r-- 1 lok362 COF\Domain Users 676535 Jul 14 06:41 postgresql-9.4.1212.jre7.jar
-rw-r--r-- 1 lok362 COF\Domain Users 2390 Jul 14 13:49 createdb.xml
-rw-r--r-- 1 lok362 COF\Domain Users 324 Aug 2 10:56 liquibase.properties
How to do a multi line insert query.
What I tried:
<column name="ColumnExample" type="varchar2(500)" value="
doc:application/msword \n docx:application/vnd.openxmlformats-officedocument.wordprocessingml.document \\n
gif:image/gif \\\n >
But it just literally insert the values instead of creating new lines. Is there a special character i'm missing to escape, or some trick to creating multiple line values? What it should be :
" Line 1 Line 2 "
What I get "Line1/nLine2" in the DB. What I have found: https://stackoverflow.com/questions/37104999/liquibase-mysql-store-newline But this just says: add CDATA but this issnt allowed anymore, or never was?
<column name="message" value="<![CDATA[ a b c d ]]>"/>
I tried this one but it only creates errors. " liquibase: The value of attribute "value" associated with an element type "column" must not contain the '<' character."
What am I missing?
Re : How to do a multi line insert query.
<column name="CHAR_VALUE" type="varchar2(500)" ><![CDATA[
line1
line2
line3
]]></column>
Where every enter in the XML file in CDATA with a \n Might wanna add it to the Docs on the 'column' page :)?
Include the same xml file twice.
Sybase - createProcedure does not 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>
- <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>
- <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">