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

Re : Skip checksum verification

$
0
0
Good. I'll see what I can do to improve the docs.

Nathan

FILENAME column in databasechangelog table.

$
0
0
Hi,

We have upgraded liquibase version from 3.1.1 to 3.2.0. We see there is a difference in how FILENAME column gets updated when we have includeAll tag in the xml between v3.1.1 and v3.2.0. Here's is the sample changelog table contents from same changeset executed first using 3.1.1 and then using 3.2.0:

  1. 122 sr /app/test/staging/sets/misc/3.1/3.1_0000003.sql 07-DEC-14 10.49.33.220426000 19 EXECUTED 7:a5cce35c1ae67b7d8fd18fbc0ee08c5c sql 3.2.0
  2. 121 sr /app/test/staging/sets/misc/3.1/3.1_0000002.sql 07-DEC-14 10.49.33.204243000 18 EXECUTED 7:7b85268acc885c1f1c1617ce31f18522 sql 3.2.0
  3. 120 sr /app/test/staging/sets/misc/3.1/3.1_0000001.sql 07-DEC-14 10.49.33.187842000 17 EXECUTED 7:938bc2375ef63ff27920137f9f83730d sql 3.2.0
  4. 122 sr ./misc/3.1/3.1_0000003.sql 07-DEC-14 10.45.53.996480000 16 EXECUTED 7:a5cce35c1ae67b7d8fd18fbc0ee08c5c sql 3.1.1
  5. 121 sr ./misc/3.1/3.1_0000002.sql 07-DEC-14 10.45.53.840490000 15 EXECUTED 7:7b85268acc885c1f1c1617ce31f18522 sql 3.1.1
  6. 120 sr ./misc/3.1/3.1_0000001.sql 07-DEC-14 10.45.53.663875000 14 EXECUTED 7:938bc2375ef63ff27920137f9f83730d sql 3.1.1

Ideally it shouldn't have executed the changesets using 3.2.0 but it went ahead executed them. These were insert statements in the table with no PK in it. Though the checksum of the changesets are same it seems the contents of FILENAME column are also part of the check whether to execute the changeset or not(the difference here is that 3.1.1 was updating this column with relative path while 3.2.0 is updating the column with absolute path for the same changelog.xml).

Here's another example of running same changeset from two different directories which has includeAll tag in it, this time using v3.2.0:

  1. 001 ascii /export/home/test/artifact_ascii/dir1/dml/test.sql 08-DEC-14 06.25.09.254245000 AM 13 EXECUTED 7:947f0f826d55db5a01a1fb3cca13d2fc sql 3.2.0
  2. 001 ascii /export/home/test/artifact_ascii/dir2/dml/test.sql 08-DEC-14 06.32.00.109212000 AM 14 EXECUTED 7:947f0f826d55db5a01a1fb3cca13d2fc sql 3.2.0

I am wondering if we have any option in 3.2.0 to limit the FILENAME column to be updated just with relative path when we are using includeAll Path tag in the xml.

Please advise.

Re : Return output messages from oracle chnageset execution to Liquibase

$
0
0
Currently liquibase doesn't have support for logging the results of a select statement, only logging the queries themselves.

I created https://liquibase.jira.com/browse/CORE-2165 to track the feature request since it would be helpful to add. 

You would be able to write a custom change or an extension to provide the functionality until there is built-in support.

Nathan

Re : Return output messages from oracle chnageset execution to Liquibase

$
0
0
Hi Nathan,

select statement was just for example, what would really be great is liquibase capturing stdout of each and every statement that is being executed. We can simply provide the log to stakeholders for verification thus saving some time further which we spent at present in making sure that changes are upto the mark or not.

Let me know your thoughts on this.

Thanks.

Re : Liquibase 3.3 : insert SYSDATE into DATE field fails with 'ora-01858'

$
0
0
Hi
sorry I forgot to give a feedback.

That worked fine!

Thanks.

Liquibase 3.3 and Oracle INTEGER gives NUMBER(10)

$
0
0
Hi

I just realized that liquibase (3.3.0 here) converts oracle (12.2) type INTEGER to NUMBER(10) instead of at least NUMBER(38).
Oracle INTEGER is seen internaly as NUMBER(*,0) which certainly means NUMBER(127,0). For sure it is upper than NUMBER(38).
So I don't see at all why using liquibase it is stucked to  NUMBER(10), which is too small and is a problem for me.

Of course I can update my tables to change the type. But I think this is a bug. Is there some workaround about this?
Regards
Frederic

Re : Liquibase 3.3 and Oracle INTEGER gives NUMBER(10)

Re : Multiple inserts in sqlFile do not fail as expected

$
0
0
You're right Nathan, our splitting wasn't working correctly. We originally had lowercase 'go' in our scripts and they were failing to run because Liquibase didn't match the regex - that's why we left out the 'go's in our test. In the time between our posting this and your reply, we discovered that we needed to change the regex to be a bit more permissive (any case comibanition). I've tried my test again with the correct split statements, and it works as expected.

Thank you.

Re : Multiple inserts in sqlFile do not fail as expected

$
0
0
Good. Thanks for the update.

Nathan

Re : Liquibase 3.3 and Oracle INTEGER gives NUMBER(10)

$
0
0
Liquibase uses NUMBER(10) to try to keep INTEGER sort of consistent with other databases. How to best handle the mappings are going to get a good overhaul soon. You can use biginteger as a type that will give you a larger integer size, or just use type="NUMBER(*,0)" directly. 

If you want to override it you can create you own IntType extension with different logic in toDatabaseType(), or you could use <modifySql> to fix up the generated NUMBER(10) for oracle.

Nathan

Re : Liquibase 3.3 : insert SYSDATE into DATE field fails with 'ora-01858'

$
0
0
Good, thanks for the update.

Nathan

Re : Return output messages from oracle chnageset execution to Liquibase

$
0
0
I added a comment to CORE-2165 about logging the result of statements. Most statements managed by liquibase are DDL statements which tend to not have much for a printable result, but I'll look at what we can do.

Nathan

Re : FILENAME column in databasechangelog table.

$
0
0
Yes, the filename is part of the unique changeset identifier. Can you post an example of the changeSets you are using? Also, was there a change in how you called liquibase from your 3.1 to 3.2 usage?

Nathan

Re : Oracle VARCHAR2 definition

$
0
0
You can create your own extension of the VarcharType class and override the toDatabaseType() method to change the behavior of what is generated. 

Without adding a new class, the easiest approach may be to use changeset parameters to define a "charUnit" variable. 

In your changelog you can define:

<property name="charUnit" value="" dbms="pgsql"/>
<property name="charUnit" value="CHAR" dbms="oracle"/>

then you can just use <column type="varchar(255 ${charUnit})"/> and liquibase will substitue in CHAR or not depending on the target database.

Nathan

Re : Replacement for missing liquibase classes moving from liquibase 2.0.3 to 3.3.0

$
0
0
Sorry for the delay getting back to you. I've been trying to get liquibase 3.3.1 out and it took longer than I was hoping.

So it looks like your class is mainly an alternative to the normal Liquibase class-finding logic to better fit in your environment? You aren't necessarily using the missing classes, but you need to make sure all the standard liquibase classes are being loaded so that it works as it should. Is that correct? Or are there extension classes of your own that are not compiling? 

The NullPointerException is odd for running 3.3.0 since that corresponds to "return true". Are you sure there isn't another liquibase version in your classpath somewhere?

Nathan


Re : FILENAME column in databasechangelog table.

$
0
0
Hi Nathan,

Here are the command we executed:

  1. java -jar /app/liquibase-3.2.0-bin/liquibase.jar --defaultsFile=./liquibase.properties    --logLevel=info --changeLogFile=./db-changelog-R3.0.xml update
  2. java -jar /app/liquibase-3.1.1-bin/liquibase.jar --defaultsFile=./liquibase.properties    --logLevel=info --changeLogFile=./db-changelog-R3.0.xml update

the changeLogFile contents are:

Re : Replacement for missing liquibase classes moving from liquibase 2.0.3 to 3.3.0

$
0
0
Thanks for getting back to me Nathan.

Just for some context, the original issue I was encountering was this;

1. I upgraded the application I'm using liquibase 2.0.3 in (note my application runs on JBoss Fuse 6.0.0)

2. When the application started up for the first time, it created the db tables via a liquibase script, all ok

3. However, when I restarted my application, it seems it couldn't connect to the db anymore, and I was seeing this;

liquibase.exception.ServiceNotFoundException: Could not find implementation of liquibase.logging.Logger

My previous version of the application (which is fine, and restarting it doesn't cause any issues), is also using JBoss Fuse 6.0.0 and liquibase 2.0.3, so I am unsure what has changed in my application to cause this issue to start appearing.

I had a google for this error and see it mentioned a couple of times before;


So at this point, I was going to try and upgrade liquibase from 2.0.3 to 3.3.0 just in case the issue had been fixed in a later release.

I'll double check the classpath to ensure I haven't another liquibase version on it in case thats causing the NPE, and do a bit more digging around.

Thanks for your help

Re : Calling sql scripts with some parameters

$
0
0
Correct. Each task is an independent action so if you need to call updateDatabase with and without an output file that would be two separate task calls (i.e. two separate <updateDatabase> elements). That is the nature of any Ant task and the command line does have that advantage in some cases.

You can combine multiple tasks into a single Ant target if you always want the two tasks to run at the same time.

If you are having any issues with the tasks or have any feedback, I would be happy to help. I am always looking to improve the tasks.

Re : FILENAME column in databasechangelog table.

$
0
0
Nathan, do you need any other information on this? I am wondering if there is any particular reason for making this change in the code.

Problems with ClassLoaderResourceAccessor in JBoss

$
0
0
Hi, 

I'm trying to programatically use liquibase to execute changecontrols over different jars. Each jar has the changecontrols files in the src/main/resources/ folder so the best way to access them is via the ClassLoaderResourceAccesor when Liquibase is instantiated.

However this accesor doesn't work very well with the includeAll tag when the jars are deployed in JBoss because the protocol being used is vfs:// and in the ClassLoaderResourceAccesor this protocol is not used.

Is there any way to execute this changecontrol?

Thank you
Viewing all 2993 articles
Browse latest View live


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