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

Re : Extension migration validation issue 3.1.1 -> 3.2.2

$
0
0
Never mind,

the problem with the "minValue" Attribute was due to the fact that the setter for the variable in the class did not follow the Bean-contract. Everything seems fine now.

Re : Extension migration validation issue 3.1.1 -> 3.2.2

$
0
0
Good, thanks for the update.

Nathan

Postgresql data type error creating xml

$
0
0
I have just ran my first generateChangeLog command without any notifications. When I tried to apply it to a new database and new schema I get the following error:   myColumn FLOAT8(*, 17)): ERROR: syntax error at or near "*"

In fact the xml generated reads: 

<column name="myColumn" type="FLOAT8(*, 17)"/>

Any ideas?

Re : Postgresql data type error creating xml

$
0
0
That may have been fixed in a later version. Are you running the newest 3.2.2?

Nathan

Re : Postgresql data type error creating xml

$
0
0
We are running 3.2.2, also I have verify the encoding and we are using UTF-8. Driver for postgres: postgresql-9.3-1102.jdbc41.jar. Java version 1.7.0 

Re : diff between current changelog and hibernate entities

$
0
0
It definitely could be done, I just haven't gotten to it yet. I'm in the middle of a large refactoring of the snapshot logic which will hopefully make it easier to implement as well.

Nathan

Re : What does liquibase validate really do, and when should I use it?

$
0
0
There should be no difference. The Liquibase.validate() method is called in both cases.

UpdateSQL will also run validate just like update does, so updateSql should be sufficient.

Nathan

Re : precondition problem mysql

$
0
0
Yes, sequences are not supported by mysql which is causing the problem. Previous versions allowed it assuming you knew they wouldn't get created but a better route is to add a dbms attribute to explicitly handle it.

Nathan

Re : Postgresql data type error creating xml

$
0
0
I see there is already an issue logged for it. https://liquibase.jira.com/browse/CORE-1956  I'm looking at data type and other snapshot logic with 3.3.

For now, you will just have to fix up the generated changeSets manually before running update.

Nathan

check migration status without locking

$
0
0
Hi,

i am using Liquibase via API aka Liquibase.class. Currently i am checking at login time if a DB upgrade is needed with listUnrunChangeSets(). This creates a lock for each check. Because this is only a readonly call which doesnt need a lock, i am wondering if there is a call which only tells me if everything is in sync, w/o creating a lock. 

We have massive Problems with left-over locks in a cluster setting, where we restart seperate nodes on a cluster (sometime even with kill -9)

So a read only sync check without a lock would be HUGHE for us.

Marc

Re : check migration status without locking

$
0
0
some more info from me. I just digged through the code. I simply dont understand why a read-only operation like "listUnrunChangeSets" calls this method:

    public void checkLiquibaseTables(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, Contexts contexts) throws LiquibaseException {
        ChangeLogHistoryService changeLogHistoryService = ChangeLogHistoryServiceFactory.getInstance().getChangeLogService(getDatabase());
        changeLogHistoryService.init();
        if (updateExistingNullChecksums) {
            changeLogHistoryService.upgradeChecksums(databaseChangeLog, contexts);
        }
        LockServiceFactory.getInstance().getLockService(getDatabase()).init();
    }

Or differently asked, why does this method includes "creating" a lock? Is there any reason someone needs to create a lock only for "getting" unrun changesets? I mean, i understand that you need to protected "update()" method calls, but why this read-only call?

Marc

Re : check migration status without locking

$
0
0
I see that we are using a pretty old Liqibase (1.9.x) and that at least with 3.1.x the listUnrunChangeSets() no longer has a waitForLock() call.

Perhaps i am chasing a phantom because of old version.

Track Database changes made with out using changeset

$
0
0
Hi All,

How to keep track of changes made to a database that are done with out using the changesets. This is the scenario.

Made Changes to database using changesets for release 1.
Made another set of changes to database using changesets for release 2.
But when it came to release 3 changes were made to database directly with out using changesets. 
Now i want to track those changes so that i can roll back those changes using liquibase up to release 2. I.e i want to roll back all changes that have taken place after release 2.

What options do i have? 

Re : Track Database changes made with out using changeset

$
0
0
You could use the liquibase diff and diffchangeset commands to see what the changes are, or to generate a changeset that has the changes necessary to get the databases back in sync. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Re : Upgrade 3.1.1 to 3.2.0 throws liquibase.exception.ValidationFailedException: Validation Failed: 1 change sets check sum .. is now: ..

$
0
0
After upgrading from 3.1.1 to 3.2.2, I still get this error:

  1. Caused by: org.soluvas.data.push.RepositoryException: Cannot migrate 'tuneeca' using 'id/co/bippo/inventory/inventorybalance.liquibase.xml': liquibase.exception.ValidationFailedException: Validation Failed:
  2.      1 change sets check sum
  3.           id/co/bippo/inventory/inventorybalance.liquibase.xml::table_inventorybalance::rudi is now: 7:49a6c46364d7612277f1bfd18f369a23
  4.         at org.soluvas.jpa.JpaRepositoryBase.migrate(JpaRepositoryBase.java:229) ~[org.soluvas.jpa-2.2.0-SNAPSHOT.jar:na]
  5.         at org.soluvas.jpa.JpaRepositoryBase.init(JpaRepositoryBase.java:240) ~[org.soluvas.jpa-2.2.0-SNAPSHOT.jar:na]
  6.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_05]
  7.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_05]
  8.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_05]
  9.         at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_05]
  10.         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
  11.         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
  12.         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
  13.         ... 27 common frames omitted
  14. Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
  15.      1 change sets check sum
  16.           id/co/bippo/inventory/inventorybalance.liquibase.xml::table_inventorybalance::rudi is now: 7:49a6c46364d7612277f1bfd18f369a23
  17.         at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:181) ~[liquibase-core-3.2.2.jar:na]
  18.         at liquibase.Liquibase.update(Liquibase.java:191) ~[liquibase-core-3.2.2.jar:na]
  19.         at org.soluvas.jpa.JpaRepositoryBase.migrate(JpaRepositoryBase.java:222) ~[org.soluvas.jpa-2.2.0-SNAPSHOT.jar:na]
  20.         ... 35 common frames omitted
the 3.1.1 checksum is: 7:4dadd82b02b0ec3cfe0902f1448fdb33
the 3.2.2 checksum is different: 7:49a6c46364d7612277f1bfd18f369a2

Is there still checksum regression with 3.2.2 ?

The problematic XML file is attached.


Re : Track Database changes made with out using changeset

$
0
0
Thank you Steve, do i have to use both Diff and diffchangeset or just one of these. Most of the diff examples given were for comparing two database.  but in my case its diff within  a single database

Would you please provide an example of how to use these two to get the difference.

Re : How to handle database changes made by an automatic upgrade script?

$
0
0
Hi XUn2,

Even i have a similar situation. Did you find a solution to your question?

Re : Upgrading from 2.0.5 to 3.2.0 - Problem with preConditions ?

$
0
0
Hi Nathan,

I tested with the version 3.2.2 and is failing as well, but I think i know why is failing.

Checking the code and running step by step i saw that the liquibase script was wrong (too bad because it is on production already). We did some changes in a table (dropping one column), and further we are deleting a view that is using this column that doesn't exist. 

So the thing is that when we are going to delete the view the view it is already invalid, and with the version 2.0.5 the property if the viewExist, was working fine, but with the new version 3.2.2 i think because the object it is not valid it is not working anymore, and just fail. 

Looking into our code I see that we are doing wrong, we should first drop the view and then remove the column in the table. But we didn't release since this new version.

Can you confirm that the viewExist does this functionality ? check if exist and it is a valid object? for me it is not clear enough and i think should be ok if the object it is valid or not it is viewExists.

Thanks in advance,


Re : Upgrading from 2.0.5 to 3.2.0 - Problem with preConditions ?

$
0
0
For now I found a work arround, and it is working fine:

<changeSet id="fix_upgrade_version_liquibase" author="e-ballo">
<preConditions onFail="MARK_RAN" onErrorMessage="View PRV_FTTH_REQUESTS_TO_AP was not found, drop view it is not needed">
<sqlCheck expectedResult="1">
SELECT count(*)
FROM all_objects t
WHERE
t.object_type = 'VIEW'
and t.object_name = 'PRV_FTTH_REQUESTS_TO_AP';
</sqlCheck>
</preConditions>
<comment>Fix the upgrade version 2.0.5 -> 3.2.2 Problem with viewExist</comment>
<dropView schemaName="PRV" viewName="PRV_FTTH_REQUESTS_TO_AP" />
</changeSet>
 

But I would like to confirm if the view exists check only valid objects :)

Thanks in advance,

Re : Upgrading from 2.0.5 to 3.2.0 - Problem with preConditions ?

$
0
0
I also find this :

<changeSet author="m-corrales" id="RENAME_PACKAGE_ITEMS_PRICE_IDS">
<preConditions onFail="MARK_RAN">
<columnExists schemaName="ATI" tableName="ATI_STM_PACKAGE_ITEMS" columnName="PRICE_IDS"/>
</preConditions>
    <renameColumn schemaName="ATI" tableName="ATI_STM_PACKAGE_ITEMS" oldColumnName="PRICE_IDS" newColumnName="PROD_PRICE_MAP_IDS"/>
</changeSet>

This precondition with the version 3.2.2 it is not working for me, the column exists execute the changeSet and the result is MARK_RAN and doesn't rename the column. Any idea ?

Thanks in advance,
Viewing all 2993 articles
Browse latest View live


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