Quantcast
Channel: Liquibase Forums
Viewing all 1169 articles
Browse latest View live

UTF 8 encoding not working for Postgres DB migrations

$
0
0
Hello,
I am using Liquibase to implement our DB versioning and migration. We use Postgres DBs.
I came across an error today when I ran a Changeset, SQL formatted, that added a comment to a column in a table. The comment contains some german characters with diacritics: ö, ü, ä. After the script was ran successfully, the characters with diacritics were not displayed in pgAdmin anymore, instead this � was displayed.

I specified the UTF-8 encoding in the ChangeLog file, like this: <?xml version="1.0" encoding="UTF-8"?> 
and in the .cmd file that I use to call the liquibase command, like this: 
call ../liquibase --url="jdbc:postgresql://localhost:5432/dbname?useUnicode=true&characterEncoding=UTF-8" --username=postgres --password=xxxx --changeLogFile=../ChangeLogs/dbname/updatexxxx.xml --logLevel=severe --logFile=logfile.txt update

Is there another setting or parameter I have to set to get the encoding right?

Thank you.

Liquibase rollback not working with "Liquibase Rollback Successful"

$
0
0
Hi guys! Please, can you help me with rollback action? It is some kind of magic - liquibase report me about successful rollback action, but nothing change.
We use sql formatted SQL. For example i have 3 files:

CASE-0-1.sql:

--liquibase formatted sql

--changeset CASE-0-1:1 failOnError:true
CREATE TABLE tt1(
cc1 INT(11));

--rollback DROP TABLE tt1;
--rollback CREATE TABLE tr1(
--rollback cr1 INT(20));


CASE-0-2.sql:

--liquibase formatted sql

--changeset CASE-0-2:1 failOnError:true
CREATE TABLE tt2(
cc2 INT(11));

--rollback DROP TABLE tt2;
--rollback CREATE TABLE tr2(
--rollback cr2 INT(20));


CASE-0-3.sql:

--liquibase formatted sql

--changeset CASE-0-3:1 failOnError:true
CREATE TABLE tt3(
cc3 INT(11));

--rollback DROP TABLE tt3;
--rollback CREATE TABLE tr3(
--rollback cr3 INT(20));


I TAG database before making any changes:

/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --logFile=0state.tag.log --username=trunk --password=Trunk \
  tag "0state"



After that i apply files and TAG database after each file apply:

/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --changeLogFile=CASE-0-1.sql --logFile=CASE-0-1.sql.update.log --username=trunk --password=Trunk \
  update
/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --logFile=CASE-0-1.sql.tag.log --username=trunk --password=Trunk \
  tag "CASE-0-1"

/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --changeLogFile=CASE-0-2.sql --logFile=CASE-0-2.sql.update.log --username=trunk --password=Trunk \
  update
/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --logFile=CASE-0-2.sql.tag.log --username=trunk --password=Trunk \
  tag "CASE-0-2"

/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --changeLogFile=CASE-0-3.sql --logFile=CASE-0-3.sql.update.log --username=trunk --password=Trunk \
  update
/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --logFile=CASE-0-3.sql.tag.log --username=trunk --password=Trunk \
  tag "CASE-0-3"


Result:

[root@mysql]# mysql -e "SELECT ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, EXECTYPE, DESCRIPTION, COMMENTS, TAG \
>           FROM DATABASECHANGELOG;" liquibase_test
+---------------+-----------+--------------------+---------------------+---------------+----------+-------------+----------+----------+
| ID            | AUTHOR    | FILENAME           | DATEEXECUTED        | ORDEREXECUTED | EXECTYPE | DESCRIPTION | COMMENTS | TAG      |
+---------------+-----------+--------------------+---------------------+---------------+----------+-------------+----------+----------+
| 1506498093527 | liquibase | liquibase-internal | 2017-09-27 10:41:33 |             1 | EXECUTED | empty       |          | 0state   |
| 1             | CASE-0-1  | CASE-0-1.sql       | 2017-09-27 10:41:57 |             2 | EXECUTED | sql         |          | CASE-0-1 |
| 1             | CASE-0-2  | CASE-0-2.sql       | 2017-09-27 10:42:08 |             3 | EXECUTED | sql         |          | CASE-0-2 |
| 1             | CASE-0-3  | CASE-0-3.sql       | 2017-09-27 10:42:12 |             4 | EXECUTED | sql         |          | CASE-0-3 |
+---------------+-----------+--------------------+---------------------+---------------+----------+-------------+----------+----------+
[root@mysql]# mysql -e "SHOW TABLES;" liquibase_test
+--------------------------+
| Tables_in_liquibase_test |
+--------------------------+
| DATABASECHANGELOG        |
| DATABASECHANGELOGLOCK    |
| tt1                      |
| tt2                      |
| tt3                      |
+--------------------------+


Now, lets try rollback:

/root/liquibase/liquibase --logLevel=debug --classpath=/usr/share/java/mysql-connector-java.jar --driver=com.mysql.jdbc.Driver \
  --url="jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true" \
  --changeLogFile=CASE-0-2.sql --logFile=CASE-0-2.sql.rollback.log --username=trunk --password=Trunk \
  rollback "CASE-0-2"
Liquibase Rollback Successful


Looks like all fine, but rollback was not executed:

[root@mysql]# mysql -e "SELECT ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, EXECTYPE, DESCRIPTION, COMMENTS, TAG \
>           FROM DATABASECHANGELOG;" liquibase_test
+---------------+-----------+--------------------+---------------------+---------------+----------+-------------+----------+----------+
| ID            | AUTHOR    | FILENAME           | DATEEXECUTED        | ORDEREXECUTED | EXECTYPE | DESCRIPTION | COMMENTS | TAG      |
+---------------+-----------+--------------------+---------------------+---------------+----------+-------------+----------+----------+
| 1506498093527 | liquibase | liquibase-internal | 2017-09-27 10:41:33 |             1 | EXECUTED | empty       |          | 0state   |
| 1             | CASE-0-1  | CASE-0-1.sql       | 2017-09-27 10:41:57 |             2 | EXECUTED | sql         |          | CASE-0-1 |
| 1             | CASE-0-2  | CASE-0-2.sql       | 2017-09-27 10:42:08 |             3 | EXECUTED | sql         |          | CASE-0-2 |
| 1             | CASE-0-3  | CASE-0-3.sql       | 2017-09-27 10:42:12 |             4 | EXECUTED | sql         |          | CASE-0-3 |
+---------------+-----------+--------------------+---------------------+---------------+----------+-------------+----------+----------+
[root@mysql]# mysql -e "SHOW TABLES;" liquibase_test
+--------------------------+
| Tables_in_liquibase_test |
+--------------------------+
| DATABASECHANGELOG        |
| DATABASECHANGELOGLOCK    |
| tt1                      |
| tt2                      |
| tt3                      |
+--------------------------+


As you can see - same set of tables we have, no table drops, no additional tables was created.

What we have in rollback logfile:

[root@mysql]# cat CASE-0-2.sql.rollback.log:
DEBUG 27.09.17 10:53: liquibase: Connected to trunk2@127.0.0.1@jdbc:mysql://localhost/liquibase_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true
DEBUG 27.09.17 10:53: liquibase: Setting auto commit to false from true
DEBUG 27.09.17 10:53: liquibase: Executing QUERY database command: select count(*) from liquibase_test.DATABASECHANGELOGLOCK
DEBUG 27.09.17 10:53: liquibase: Executing QUERY database command: select count(*) from liquibase_test.DATABASECHANGELOGLOCK
DEBUG 27.09.17 10:53: liquibase: Executing QUERY database command: SELECT LOCKED FROM liquibase_test.DATABASECHANGELOGLOCK WHERE ID=1
DEBUG 27.09.17 10:53: liquibase: Lock Database
DEBUG 27.09.17 10:53: liquibase: Executing UPDATE database command: UPDATE liquibase_test.DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'mysql-gigantic-dummy-dvaco-trunk-28.aws.srv (172.29.13.83)', LOCKGRANTED = '2017-09-27 10:53:26.625' WHERE ID = 1 AND LOCKED = 0
INFO 27.09.17 10:53: liquibase: Successfully acquired change log lock
DEBUG 27.09.17 10:53: liquibase: Computed checksum for 1506498806750 as 17f1742877fc068db5453ca9db9d60e3
DEBUG 27.09.17 10:53: liquibase: Executing QUERY database command: SELECT MD5SUM FROM liquibase_test.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
DEBUG 27.09.17 10:53: liquibase: Executing QUERY database command: select count(*) from liquibase_test.DATABASECHANGELOG
INFO 27.09.17 10:53: liquibase: Reading from liquibase_test.DATABASECHANGELOG
DEBUG 27.09.17 10:53: liquibase: Executing QUERY database command: SELECT * FROM liquibase_test.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
DEBUG 27.09.17 10:53: liquibase: CASE-0-2.sql: CASE-0-2.sql::1::CASE-0-2: Computed checksum for inputStream as 80fa2b893f3b36ef72cf796a9ce61189
DEBUG 27.09.17 10:53: liquibase: CASE-0-2.sql: CASE-0-2.sql::1::CASE-0-2: Computed checksum for 7:80fa2b893f3b36ef72cf796a9ce61189: as 6c11f0a414ae9865f42a220f71f1e3d1
DEBUG 27.09.17 10:53: liquibase: Release Database Lock
DEBUG 27.09.17 10:53: liquibase: Executing UPDATE database command: UPDATE liquibase_test.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1

INFO 27.09.17 10:53: liquibase: Successfully released change log lock


I checked different variants, different liquibase file formatting, different command line options - useless. Liquibase always say "Liquibase Rollback Successful", but do nothing.

Please, help. May be someone use rollback actions with sql, or other formats? Where the mistake? What i am doing wrong? Is it working liquibase feature at all?

data Difference between two schemas in Liquibase

$
0
0
Hi All,

I am running the below command
java -jar liquibase.jar
 --driver=<driver name>
 --clasapth=<classpath + liquibase jar>
 --changeLogFile=<file name + path>
 --url=<schema1>
 --username=<username>
 --password=<pwd>
 --referenceUrl=<schema2>
 --referenceUsername=<username>
 --referencePassword=<pwd>
 --diffTypes=data
generateChangeLog


This command gives me a file dump with xKB , the file contains only the changeSet of the (url+username+password) DB, not the actual comaprison between both the tables and values of each table.

can you please help me with the correct command if the above one is wrong ?

Insert with subselect

$
0
0
Hi,
I want to execute a query as follow:

INSERT INTO table1 (
      field1_pk, 
      field2, 
      field3) 
values (
      'value1', 
      'value2', 
       (select field2 from table2 where field1_pk = 'PIPPO') 
)

It is possible with Liquibase without <sql> tag ?

Thanks in advance

Java 9 Support

$
0
0
Currently liquibase fails to work on java 9 due to incorrect parsing of the version number, there is are some pull request to try to fix this https://github.com/liquibase/liquibase/pull/710

We have patched locally and works well. Is it possible to get a release with this in?

Code referencing com/amazon/redshift/core/jdbc42/PGJDBC42DriverImpl at runtime

$
0
0
Hello

I am using liquibase to connect to Redshift to manipulate my DDL. I am using the following Pom dependencies:

  1.     <dependency>
  2.         <groupId>com.amazon.redshift</groupId>
  3.         <artifactId>redshift-jdbc42</artifactId>
  4.         <version>1.2.8.1005</version>
  5.     </dependency>
  6.     <dependency>
  7.         <groupId>org.liquibase.ext</groupId>
  8.         <artifactId>liquibase-redshift</artifactId>
  9.         <version>1.0</version>
  10.     </dependency>
  11.     <dependency>
  12.         <groupId>org.liquibase</groupId>
  13.         <artifactId>liquibase-core</artifactId>
  14.     </dependency>

and in my properties file, I reference the following driver:

  1. datasource.config.driver-class-name=com.amazon.redshift.jdbc42.Driver
In my local environment, my code works fine, but when I deploy the code and during runtime, I receive the following error:

  1. [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/amazon/redshift/core/jdbc42/PGJDBC42DriverImpl

I am not sure what is calling this driver, but I verified that I am able to pick up the properties file in DEV, but it keeps calling a driver (PGJDBC42DriverImpl) that I am not specifying. I have explicitly called out the driver I want to use in my DEV properties file. (com.amazon.redshift.jdbc42.Driver) 

I have found a few other solutions out there, but I am unable to resolve my problem. For example:
  1.  using com.amazon.redshift.core.jdbc4.PGJDBC4DriverImpl, but I cannot find it in the jar RedshiftJDBC4-no-awssdk-1.2.8.1005.jar


That does not resolve my problem because now I get the known redshift "TAG" issue. I was able to resolve that with using com.amazon.redshift version 1.2.8.1005. By using the no awssdk jar, I revert myself to the insert into the changelog table issue. 

Any help will be greatly appreciated!

Use Liquibase, hsqldb and postgre

$
0
0
Hello,

I am new to liquibase and started to learn it. I set my postgre database and connected it to liquibase.
driver: org.postgresql.Driver
classpath: ./lib/postgresql-9.2-1002-jdbc4.jar
url: jdbc:postgresql://db-tools.localhost.squaretrade.com:5432/tools
username: ""
password: ""
changeLogFile: src/main/db/tools/public/changelog/main_tools_changelog.xml
and I also want to use HSQLDB for in memory database to run my tests.
I searched many of the topics here and also on internet but didn't get correct result.
Some are using only hsqldb with liquibase and some postgre.
I concern is, I want to dump my postgre database and add it to liquibase which I did, and then I want to use  hsqldb for in memory.
is it possible?

Thanks

Phoenix/Hbase Extension


Liquibase java 8 LocalTime, LocalDate, LocalDateTime support

$
0
0
Hi, 
I use liquibase on many project, but we need to used java 8 date/time object. When i use liquibase to create Diff with database and java all java 8 date type is create with BYTEA in liquibase migration. Can you add the correct mapping : 
- LocalDate -> Date
- LocalDateTime -> TIMESTAMP WITHOUT TIME ZONE
- LocalTime -> TIME WITHOUT TIME ZONE
Thank's 

Re : data Difference between two schemas in Liquibase

$
0
0
team, help/tips to acheive my above stmt will be much appreciable.

Re : Not loading SnakeYAML?

$
0
0
Hi, 

I am facing the same issue. I tried creating lib dir but still not working.

I am using liquibase 3.5.3.


HELP- can't run liquibase in command-line

$
0
0
I've created a liquibase.properties like this:
  1. classpath=./postgresql-42.1.4.jar:./snakeyaml-1.18.2.jar
  2. changeLogFile=./src/main/resources/db/changelog/db.changelog-master.yaml
  3. username=postgres
  4. password=mysecret
  5. url=jdbc:postgresql://localhost:5432/mydatabase 
  6. driver=org.postgresql.Driver

And try to perform a simple update:

  1. liquibase update
And I get the error:
  1. Unexpected error running Liquibase: org.yaml.snakeyaml.Yaml
As can be seen in the file i've added two files to the current folder I'm executing it:
- postgresql-42.1.4.jar
- snakeyaml-1.18.2.jar

and finally this is the yaml file for the updates:
  1. databaseChangeLog:
  2.     - includeAll:
  3.         path: db/changelog/changes/
NOTE: I've added this into a spring boot app and when the app runs this gets updated without any hassle.
SECOND NOTE: I've had to add the file postgresql-42.1.4.jar, because otherwise it kept giving me the error:
  1. Connection could not be created to postgresql://localhost:5432/mydatabase with driver org.postgresql.Driver.  Possibly the wrong driver for the given database URL
So, it's very frustrating, since this should be the simplest way to use liquibase.

Any help ? 




Re : Liquibase vs SQLPLUS for SPOOL output.

$
0
0
Are you able to solve this problem? If then, please share me the steps

Re : Liquibase vs SQLPLUS for SPOOL output.

$
0
0
When using Liquibase keep in mind, that it is executing all sql commands directly via JDBC. So all non JDBC conform command will throw a error.

I know many DBMS have command line tools with special command sets (sqlplus or db2 cli are examples) but their extensions are not valid sql and can not be executed by liquibase. You either have to rewrite the sql files or change them in some kind of preprocessing (search and replace the suspect lines).

Error in url: jdbc:postgresql://localhost:5432 liquibase

$
0
0
I am new to liquibase and unable to follow the docs and expected behaviour .
I want to setup the liquibase for local database named liquibase. 
Here i dont know hich commands are to be executed first and which next.
Guide me with this and error what is being displayed

how can I run a set of changeSet in transaction

$
0
0
Hi

I need to run a set of changeSet in transaction, how can I do it ?
Or maybe a way to "--changeLogFile update" in transaction.

I know that each changeSet has a transaction, but I need only one transaction for all.

Thanks

Re : how can I run a set of changeSet in transaction

$
0
0
I was thinking in use the updateSQL to an output file, take this file and put it all in one single changeSet as sql.
But if i di't it, I'll lose all my preCondition.

The liquibase.exception occurs during generateChangeLog when mssql constraint has comments

$
0
0
Hello

I created the TestDb on Microsoft SQL Server 2014, then I created the table
 
CREATE TABLE [dbo].[TestTable](
    [Id] [uniqueidentifier] NOT NULL,
    [Name] [nchar](10) NULL,
    [Number] [int] NULL,
 CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
(
    [Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[TestTable] ADD  CONSTRAINT [DF_ConstraintName]  DEFAULT ('No name') FOR [Name]
GO

After that I create
CREATE DEFAULT [dbo].[DefaultZeroValue]
AS
0
GO

and did
EXEC sp_bindefault 'DefaultZeroValue', 'TestTable.Number';

After all this, I did
liquibase --defaultsFile="test.prop" generateChangeLog

and I got newchangelog.mssql.sql with content

--liquibase formatted sql

--changeset TestDb:1510256718974-1
CREATE TABLE [TestTable] ([Id] [uniqueidentifier] NOT NULL, [Name] [nchar](10) CONSTRAINT [DF_TestTable_Name] DEFAULT 'No name', [Number] [int] CONSTRAINT [DF_TestTable_Number] DEFAULT create default DefaultZeroValue
    as 0);

--changeset TestDb:1510256718974-2
ALTER TABLE [TestTable] ADD CONSTRAINT [PK_TestTable] PRIMARY KEY ([Id]);


But if I change the type of column Number from int to bit and do again sp_bindefault, then after executing
liquibase --defaultsFile="test.prop" generateChangeLog
I get the exception:

DEBUG 09.11.17 23:38: liquibase: Executing QUERY database command: SELECT CAST([ep].[value] AS [nvarchar](MAX)) AS [REMARKS] FROM [sys].[extended_properties] AS [ep] WHERE [ep].[class] = 1 AND [ep].[major_id] = OBJECT_ID(N'[dbo].[DATABASECHANGELOGLOCK]') AND [ep].[minor_id] = COLUMNPROPERTY([ep].[major_id], N'LOCKEDBY', 'ColumnId') AND [ep].[name] = 'MS_Description'
DEBUG 09.11.17 23:38: liquibase: Executing QUERY database command: SELECT CAST(value as varchar(max)) as REMARKS FROM sys.extended_properties WHERE name='MS_Description' AND major_id = OBJECT_ID('[dbo].[TestTable]') AND minor_id = 0
Unexpected error running Liquibase: liquibase.exception.DatabaseException: java.lang.NumberFormatException: For input string: "create default DefaultZeroValue  as 0"

SEVERE 09.11.17 23:38: liquibase: liquibase.exception.DatabaseException: java.lang.NumberFormatException: For input string: "create default DefaultZeroValue  as 0"
liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: java.lang.NumberFormatException: For input string: "create default DefaultZeroValue  as 0"
        at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:265)
        at liquibase.integration.commandline.Main.doMigration(Main.java:1011)
        at liquibase.integration.commandline.Main.run(Main.java:188)
        at liquibase.integration.commandline.Main.main(Main.java:103)
Caused by: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: java.lang.NumberFormatException: For input string: "create default DefaultZeroValue  as 0"
        at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13)
        at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:263)
        ... 3 more
Caused by: liquibase.exception.DatabaseException: java.lang.NumberFormatException: For input string: "create default DefaultZeroValue  as 0"
        at liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(ColumnSnapshotGenerator.java:129)
        at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:73)
        at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
        at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:246)
        at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:363)
        at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:385)
        at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:293)
        at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:267)
        at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:80)
        at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:53)
        at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:28)
        at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:150)
        at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:139)
        at liquibase.command.DiffCommand.createReferenceSnapshot(DiffCommand.java:219)
        at liquibase.command.DiffCommand.createDiffResult(DiffCommand.java:141)
        at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:45)
        at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8)
        ... 4 more
Caused by: java.lang.NumberFormatException: For input string: "create default DefaultZeroValue  as 0"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.valueOf(Unknown Source)
        at liquibase.util.SqlUtil.parseValue(SqlUtil.java:142)
        at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readDefaultValue(ColumnSnapshotGenerator.java:491)
        at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readColumn(ColumnSnapshotGenerator.java:273)
        at liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(ColumnSnapshotGenerator.java:123)
        ... 20 more


For more information, use the --logLevel flag

Please, help

Liquibase 3.5 CORE-2553

$
0
0

does anyone know the syntax for disabling reorg statement when adding columns to a DB2 database tables (as described in liquibase v3.5 CORE-2553)


Re : Liquibase 3.5 CORE-2553

$
0
0
It somewhat depends on how you run liquibase - from the command line, via the maven plugin, or something else?

In each of the cases, you would set the property autoReorg to true or false. If you are running liquibase from the command line using liquibase.bat or liquibase.sh, you can either:
- add a Java system property to the command line: -Dliquibase.autoReorg=[true|false]
- set a property in a liquibase.properties file - I don't think you need the liquibase prefix in that case, just autoReorg=[false|true]

If you were using the maven plugin, you would set the property the same way you set other liquibase properties in the plugin. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Viewing all 1169 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>