Re : Upgrade 3.1.1 to 3.2.0 throws liquibase.exception.ValidationFailedException: Validation Failed: 1 change sets check sum .. is now: ..
Re : Checksum changed without reason
Liquibase Mysql Includes
These are special considerations for MySQL which include the following:
-- Fulltext Index for columns
-- SQL escape. Escaping single quotes when generating csv data dump.
-- Table Engine. MyISAM, InnoDB, etc. added to changlelog
-- Column Datatype replicated exactly as created. ( i.e. int only went up to int(10) even though the column was created as int(11), double created as double(22) which generates an sql error, etc. )
Then there are some general changes that I just thought would be helpful to my specific projects:
-- only create csv during data dump if there is data in table, instead of generating a csv for an empty table.
-- Creating multiple changelog files at once
-- Including or Excluding only certain tables in data or creation dump. Say if you want to export only specific tables. As per the previous point, you can put certain tables in one changelog and others in another and also ignore others completely. Useful if you have test tables or code generated tables you don't want to include in your releases.
Some of the groovy tests need to be edited, .i.e remove some of the test cases, when building to ignore the changes. Or add the changes to the groovy tests where applicable.
DIFF - Getting "schemas equal" result for completely different schemas
Diff Results:
Reference Database: 1@ jdbc:db2://D1:50005/N1(Default Schema: 1
)
Comparison Database: 1@ jdbc:db2://D2:50002/N2(Default Schema: 1
)
Product Name: EQUAL
Product Version: EQUAL
Missing Catalog(s): NONE
Unexpected Catalog(s): NONE
Changed Catalog(s): NONE
Missing Column(s): NONE
Unexpected Column(s): NONE
Changed Column(s): NONE
Missing Foreign Key(s): NONE
Unexpected Foreign Key(s): NONE
Changed Foreign Key(s): NONE
Missing Index(s): NONE
Unexpected Index(s): NONE
Changed Index(s): NONE
Missing Primary Key(s): NONE
Unexpected Primary Key(s): NONE
Changed Primary Key(s): NONE
Missing Schema(s): NONE
Unexpected Schema(s): NONE
Changed Schema(s): NONE
Missing Sequence(s): NONE
Unexpected Sequence(s): NONE
Changed Sequence(s): NONE
Missing Stored Procedure(s): NONE
Unexpected Stored Procedure(s): NONE
Changed Stored Procedure(s): NONE
Missing Table(s): NONE
Unexpected Table(s): NONE
Changed Table(s): NONE
Missing Unique Constraint(s): NONE
Unexpected Unique Constraint(s): NONE
Changed Unique Constraint(s): NONE
Missing View(s): NONE
Unexpected View(s): NONE
Changed View(s): NONE
Re : DIFF - Getting "schemas equal" result for completely different schemas
Re : Adding comments to changesets no longer works reliably
Precondition to Check Whether Column is Nullable
Upgrading from 2.0.5 to 3.2.0 - Problem with preConditions ?
- <changeSet author="e-ballo" id="RENAME_TEMPLATE_PACKAGE_PRICE_IDS">
- <preConditions onFail="MARK_RAN">
- <columnExists schemaName="ATI" tableName="ATI_SCENARIO_TEMPLATE_PACKAGES" columnName="PRICE_IDS"/>
- </preConditions>
- <renameColumn schemaName="ATI" tableName="ATI_SCENARIO_TEMPLATE_PACKAGES" oldColumnName="PRICE_IDS" newColumnName="PROD_PRICE_MAP_IDS"/>
- </changeSet>
Re : How to tag a database with liquibase 3.2.0 ?
Buildfile: C:\Production\jboss_emr\g2\build-ci.xmlHere's my ant target.
tag-database:
[tagDatabase] WARNING 7/8/14 10:09 AM: liquibase: Can not use class liquibase.ext.hibernate.database.HibernateSpringDatabase as a Liquibase service because org.springframework.beans.factory.support.BeanDefinitionRegistry is not in the classpath
[tagDatabase] INFO 7/8/14 10:09 AM: liquibase: Successfully acquired change log lock
[tagDatabase] INFO 7/8/14 10:09 AM: liquibase: Successfully released change log lock
BUILD FAILED
C:\Production\jboss_emr\g2\build-ci.xml:383: liquibase.exception.DatabaseException: java.lang.NullPointerException
Total time: 5 seconds
<target name="tag-database">
<tagDatabase
driver="${database.driver}"
url="${database.url}"
username="${database.username}"
password="${database.password}"
classpathref="g2.classpath"
tag="R1.0"
>
</tagDatabase>
</target>
All of the properties and references used work in my updateDatabase target so those are correct.
Liquibase generateChangeLog is failing - with Table already exists
Apologies, this is a cross post from Stackoverflow.
I am getting a "table already exists" error from Liquibase when I run my Jhipster project:
[ERROR] liquibase - classpath:config/liquibase/master.xml: classpath:config/liquibase/changelog/db-changelog-001.xml::1::jhipster: Change Set classpath:config/liquibase/changelog/db-changelog-001.xml::1::jhipster failed. Error: Error executing SQL CREATE TABLE fc.T_USER (login VARCHAR(50) NOT NULL, .....: Table 't_user' already exists
I have generated the Liquibase changelog file into config\liquibase\changelog directory using
liquibase --driver=com.mysql.jdbc.Driver ^ --classpath=C:\Users\Greg\.IntelliJIdea13\config\jdbc-drivers\mysql-connector-java-5.1.31-bin.jar ^ --changeLogFile=db-changelog-001.xml ^ --url="jdbc:mysql://localhost/fc" ^ --username=root ^ generateChangeLog
So something is tricking Liquibase into trying to re-create the database when the changelog, I thought, was setting a baseline of the existing database.
- Jhipster version: When I yo jhipster -v is says 1.2. When I nmp update jhipster is says I am on the latest = 17.2
- Liquibase version tried 3.0, 3.1 and 3.2
- Mysql database from XAMP
- 2 tables are created in Mysql - databasechangelog and databasechangeloglock
- databasechangelog remains empty and databasechangeloglock has a record added when Jhipster app is run
This process was working but not since move to new computer. When it was working I saw databasechangelog had a couple of records in it as well as 1 in databasechangeloglock
Tips on how to debug as welcome as an answer. Thanks
How to reference new change in xml file
Re : Execute an Oracle sql script
Re : Execute an Oracle sql script
This is still a critical issue for us.
Is there a reason why this has been closed?
Thanks,
Uri
Re : Liquibase Jenkins Plugin
I love the concept and love the fact that the plugin works.
The job configuration input requires a log of information. My preference would be if you had a mechanism on the global configuration to redefine database connections that jenkins jobs would refer to. https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin is an example of a jenkins plugin that has a similar issue. That feature would reduce the job parameters from 9 to 4 and would allow users to configure liquibase conversions without having direct access to the passwords.
I haven't looked at the code but it looks like the plugin is using jenkins' ${PATH} to find the liquibase executables. My preference would be to configure this at the java classpath level. That way liquibase can be maintained independently of the jenkins server and we could run multiple liquibase versions with the same set of database drivers.
Again, this plugin is a great idea and the notion of having easy to read jenkins badges for the conversions is fantastic. Please let the forum know what changes you are considering and people may volunteer to help with them.
Re : Upgrade 3.1.1 to 3.2.0 throws liquibase.exception.ValidationFailedException: Validation Failed: 1 change sets check sum .. is now: ..
Generated duplicate constraint names
<changeSet author="foobar(generated)" id="1404858920815-630">
<addPrimaryKey columnNames="id" constraintName="CHARGE_HEADERPK" tableName="CHARGE_HEADER"/>
</changeSet>
<changeSet author="foobar(generated)" id="1404858920815-631">
<addPrimaryKey columnNames="id" constraintName="CHARGE_HEADERPK" tableName="CHARGE_HEADER_SENT"/>
</changeSet>
Obviously this fails when I try to update the database with these changesets (ORA-02264: name already used by an existing constraint). I also wonder why there is no flag for the column tag that would indicate which column is a primary key, rather than having all these addPrimaryKey tags. That would avoid this duplicate name problem entirely.
Thanks,
Larry Kline
Re : preCondition onFail="CONTINUE"
The documentations says explicitly "Outside a changeset (e.g. at the beginning of the change log), only HALT and WARN are possible values.", but there is no explanation why.
I would like to have a "master" changelog which includes other "sub-changelogs". In these ones I would like to have a precondition check with CONTINUE or MARK_RAN, so that a whole sub-changelog can be skipped. Writing the precondition in every changeset would be much more work and has the risk of forgetting it on a changeset.