Quantcast
Channel: Liquibase
Viewing all 200 articles
Browse latest View live

Liquibase 3.0.4 Released

$
0
0

There was a null pointer issue that was tripping up enough people with 3.0.3 that I created a small 3.0.4 release to address the issue.

The issues fixed are:

  • [CORE-1423] – NPE in ForeignKeyComparator
  • [CORE-548] – GenerateChangeLog generates invalid XML/SQL for mysql tables with autoincrement and compound PKs

with CORE-1423 being the one most people were running into.

You can download 3.0.4 from http://liquibase.org/download and through the maven repository system once it gets mirrored through.


Liquibase 3.0.5 Released

$
0
0

Performance

The major focus of this release is performance improvements:

  • Startup time is significantly improved for larger databases
  • Preconditions now snapshot far less of the database
  • Running generateChangeLog on a test MySQL database with over 4000 tables went from crashing after an hour to completing in 30 seconds. Even an Oracle database with the same structure finished in a couple minutes.

If you are still seeing any unexpected performance problems, file a bug report

You can download 3.0.5 from http://liquibase.org/download and through the maven repository system once it gets mirrored through. If you have any questions or problems, visit the forums or bug tracker

Notable Bugs

  • Multi-column foreign keys are snapshotted correctly now
  • Improved case-sensitive/insensitive handling

Potential Gotchas

Three bug fixes related to data type translations went into 3.0.5 which may cause issues for people that had been relying on incorrect behavior

  • MS  SQLServer “DATE” columns are now translated to “DATE” rather than SMALLDATETIME
  • MySQL TIMESTAMP columns are now nullable if you do not specify that they should be not null
  • H2 and HSQL CLOB columns are now translated as CLOB rather than LONGVARCHAR

Full Change Log

  • [CORE-845] – “DATE” data type is deployed as “SMALLDATETIME” in SQL 2008
  • [CORE-859] – Nullable TIMESTAMP columns in MySQL are not nullable.
  • [CORE-1257] – Oracle: generateChangeLog exports a column of type “NUMBER” as “NUMBER(0,-127)”
  • [CORE-1288] – H2 (and other) support for BLOB and CLOB is incorrect
  • [CORE-1338] – Using apostrophe in changeset’s ID causes SQL error
  • [CORE-1360] – Confirmation message of a custom change change is only printed if loglevel is debug
  • [CORE-1364] – SQL Server incorrect INFORMATION_SCHEMA table case in native query
  • [CORE-1365] – SQL Server: “Database ‘dbo’ does not exist” error
  • [CORE-1401] – Unnecessary snapshot on liquibase update
  • [CORE-1415] – Liquibase tables are not detected in oracle running in the SYSTEM schema
  • [CORE-1426] – ORACLE: Check for existing tables is case sensitive
  • [CORE-1429] – Random order of UniqueConstraint and ForeignKey drop statements
  • [CORE-1459] – Maven updateSQL creates databasechangelog table, should only output SQL to do it
  • [CORE-1462] – renameColumn with ‘text’ data type improperly trying to use ‘clob’ against MySql
  • [CORE-1433] – Handle changes in column datatypes in diffChangeLog
  • [CORE-1434] – Formatted Changelog format not parsing UTF8 .sql files with BOM
  • [CORE-1453] – Multi-column foreign keys not snapshotted correctly

 

Full Speed Ahead For Liquibase

$
0
0

For the last two months I have been working full time as an employee with Datical, a startup that is building an enterprise-ready database change management solution on top Liquibase.

For me, it has been great because I am now able to devote considerably more time to Liquibase than I ever have before. Since starting Liquibase 7 years ago, I’ve ran it as a side hobby–spending a few night and weekend hours doing what  I can to progress the project. However, as the community and user base has grown it had become difficult to keep pace. You may have noticed that during the 3.0 development timeline, I tended to oscillate between spending all my time writing code without answering any user questions and answering questions without writing code simply because I just didn’t have enough time to do everything I needed to.

So what does this change in employment mean for Liquibase? Nothing but good things!

Liquibase remains and always will be a freely available open source project. At Datical, we know the value of a strong open source project and community, and my primary responsibility at Datical is to spend as much time on Liquibase as possible in order to improve it for ourselves and for everyone else. In short, my job is to do what I have always done but with more focus and more resources.

Now that I have full days worth of time to spend on Liquibase, I have already been able to pick up the pace of Liquibase releases plus keep up with the user forums. It has been great!

In the coming months, look for more great changes to Liquibase including:

  • Improved Documentation
  • More extensions (New Liquibase/Hibernate Extension should be out this week)
  • Regular and frequent releases
  • Easier use
  • Enhanced extension portal
  • More community interaction
  • Streamlined extension writing tools
  • More support and training options and opportunities

If you would like more information on Datical and DaticalDB you can read their official launch announcement. Or, as always, ask questions in the blog comments, in the Liquibase forum, or contact me directly at nathan.voxland@liquibase.org.

 

Liquibase 3.0.6 Released

$
0
0

I’m happy to announce Liquibase 3.0.6 has been released. While the previous release focused on performance, this release was focused on catching up with pull requests and resolving some of the higher value bugs.

Some highlights and important notes:

  • IMPORTANT: CDI support has been pulled into a separate liquibase-cdi module. If you are using the CDI integration you need to download the additional jar from http://search.maven.org/#search%7Cga%7C1%7Cliquibase-cdi
  • IMPORTANT: The DatabaseChangeLog table no longer contains a primary key which allows us to increase the column sizes without running into index limitations. Author, Id, and Path can all be 255 characters now. This just applies to new changelog tables, though. Liquibase will not adjust an existing changelog table to increase the size.
  • New liquibase.integration.spring.MultiTenantSpringLiquibase integration that runs Liquibase against all database instances in a JNDI subtree
  • Command line supports prompting for command line variables by using PROMPT as a value in the passed arguments. For example “liquibase –username=test –password=PROMPT”
  • Added support for Sybase IQ
  • Fixed Firebird support
  • Fixed include relativeToChangeLog
  • Improvements to Fixes in case [in]sensitive comparison logic
  • Corrections in the Oracle data type snapshot process
  • Better handling of Mysql keywords

Download Liquibase from http://liquibase.org/download or from the Maven repository as it winds its way through the mirror process. Visit the user forums if you have any questions.

All Closed Issues:

  • [CORE-1088] – Derby fails to create databasechangelog tables
  • [CORE-1093] – generateChangeLog fails on MSSQL with coalation CS on views named in lowerCase
  • [CORE-1158] – Escaping of reserved keywords in HSQLDB
  • [CORE-1170] – loadUpdateData sometimes needs / and sometimes not
  • [CORE-1177] – Failure to write a change set to the DATABASECHANGELOG table still applies the change set
  • [CORE-1325] – CDI injection does not work with openwebbeans
  • [CORE-1343] – Include SQL file with relativeToChangelogFile doesn’t work
  • [CORE-1378] – Deploy fails on Glassfish
  • [CORE-1409] – Package CDI support as a separate module
  • [CORE-1436] – loadUpdateData does not escape apostrophes
  • [CORE-1437] – Diff is case-sensitive on column names
  • [CORE-1440] – Reorg Table gets called before table is created on DB2
  • [CORE-1441] – Drop table with cascade does not work on MS SQL Server
  • [CORE-1443] – Documentation for liquibase maven logging configuration needs update
  • [CORE-1445] – Mysql Reserved Words Not quoted
  • [CORE-1449] – Liquibase throws null pointer if included file does not exist
  • [CORE-1464] – SQL changelog are not correctly handled (NPE)
  • [CORE-1465] – GetViewDefinitionGeneratorMSSQL generates UPPER case view name
  • [CORE-1469] – GenerateChangelog not working on Firebird
  • [CORE-1470] – Use NUMERIC instead of NUMBER for Sybase ASE
  • [CORE-1478] – MySQL keywords `key’ not quoted as a column name
  • [CORE-1479] – MySQL 5.5.27 fails to create DATABASECHANGELOG table (Liquibase support fully broken)
  • [CORE-1480] – ChangedPrimaryKeyChangeGenerator missing name
  • [CORE-1481] – Schema.toString NPE
  • [CORE-1482] – Update fails with “Table DATABASECHANGELOGLOCK already exists”
  • [CORE-1483] – Boolean values of “false” being incorrectly handled
  • [CORE-1488] – Encoding issue with UpdateSQL
  • [CORE-1490] – Oracle 10g: Changelog generation changes type NUMBER(*,0) to NUMBER(22)
  • [CORE-1491] – Oracle 10g: changelog generation converts VARCHAR2(n CHAR) to VARCHAR2(n BYTE)
  • [CORE-1497] – SQL SERVER: sysdiagram table is captured during generateChangeLog if system diagrams are enabled.
  • [CORE-1499] – null appearing in liquibase maven output
  • [CORE-1500] – Snapshots do not order objects alphabetically
  • [CORE-1501] – Incorrect SQL generated for default column value in PostgreSQL for text columns
  • [CORE-602] – Increase the default size of the FILENAME column
  • [CORE-1475] – Support entering password(s) interactively on the command line
  • [CORE-1477] – Support overriding LockService changeLogWaitTime
  • [CORE-1485] – Extract CDI support into a separate module
  • [CORE-1492] – DatabaseChangelog Description useless
  • [CORE-1502] – CLONE – UpdateSQL needs to append a “/” to the end of createProcedure for Oracle
  • [CORE-1448] – Throw a more helpful error message and continue on if snakeyaml isn’t in the classpath
  • [CORE-1471] – Add support for Sybase IQ
  • [CORE-1472] – Support multi-tenant spring applications

New Liquibase Hibernate Extension Released

$
0
0

After far too long, a new version of the Liquibase-Hibernate extension has been released!

Downloads, documentation, and issue tracking is hosted at github.com/liquibase/liquibase-hibernate. The extension is also available through Maven with group org.liquibase.ext, artifacts liquibase-hibernate3 and liquibase-hibernate4.

New Features

Liquibase 3.0 Support

If you’ve been stuck on Liquibase 2.0 because of the old hibernate integration, the wait is over. The extension requires Liquibase 3.0.6+, so make sure you are on the newest version of Liquibase.

Hibernate 4 Support

There are two separate jar files available: liquibase-hibernate3.jar and liquibase-hibernate4.jar. Use the version that corresponds to your Hibernate version

EJB3 Configuration Support

If you are using the EJB3-style persistence.xml file, you can now use a database url of “hibernate:ejb3:yourPersistenceUnit“.

Spring Configuration Support

If your Hibernate configuration is specified in Spring, you can now use a database of “hibernate:spring:your/path/spring.xml?bean=sessionFactory” to pull the Hibernate configuration from your spring context.

Programmatic Configuration Support

You can now create your Hibernate configurations dynamically by implementing liquibase.ext.hibernate.customfactory.CustomClassicConfigurationFactory or  liquibase.ext.hibernate.customfactory.CustomEjb3ConfigurationFactory and reference the classes in your database url. For example, “hibernate:classic:com.example.YourFactory” or ”hibernate:ejb3:com.example.YourFactory

Upgrade Notes:

  • The standard database url has changed from “hibernate:path/to/your/file.xml” to “hibernate:classic:path/to/your/file.xml”
  • Requires Liquibase 3.0.6+
  • Jar name has changed from liquibase-hibernate.jar to liquibase-hibernate3.jar (or liquibase-hibernate4.jar)

Group of Liquibase Extensions Updated

$
0
0

There has been a lot of activity the last couple weeks on the Liquibase extensions I manage and/or have source access to. There were a few running up against the Oct 15th jira-svn-shutdown deadline and also several that had not been updated to support Liquibase 3.0 yet.

For all of the extensions, I have moved their source repository out of the shared liquibase.jira.com subversion repository and into their own repositories at https://github.com/liquibase. They all now have their own issue tracking, wiki, and releases tab in their Github projects, which is the pattern I will be using for all the Liquibase-managed extensions.

I also released the new builds into Maven under the org.liquibase.ext group (some may still be propagating through the mirrors).

 

The recently updated extensions are:

Oracle Database Support (https://github.com/liquibase/liquibase-oracle)

Improved support for Oracle database. Adds additional refactoring tags and snapshot support for Oracle-specific object types

Hana Database Support (https://github.com/liquibase/liquibase-hanadb)

Support for SAP’s Hana Database

Teradata Database Support (https://github.com/liquibase/liquibase-teradata)

Adds support for Teradata database. Still in beta because I am looking for Teradata users to test it

No Change Log Update (https://github.com/liquibase/liquibase-nochangelogupdate)

Makes Liquibase run without updating the DATABASECHANGELOG table. Not what you normally want, but there are times it is handy

java.util.Logger Support (https://github.com/liquibase/liquibase-javalogger)

Log through java.util.Logger rather than STDERR

Sequence Table (https://github.com/liquibase/liquibase-sequencetable)

Support “sequence tables” like Hibernate can use for databases that do not support native schemas

Modify Column (https://github.com/liquibase/liquibase-modify-column)

Support for the deprecated <modifyColumn> change from Liquibase 1.x

 

The main “Liquibase Extension Portal” is still at liquibase.org/extensions, the above extensions are simply the subset of extensions that I tend to manage. In the upcoming weeks, I will be working to improve the extension portal and the extension writing process in general (including better documentation)

Liquibase 3.0.7 Release

$
0
0

Lots of good bugfixes in 3.0.7, but major improvements are:

  • Significantly decreased memory usage, especially with large sql files
  • Improved checksum performance
  • Fixed SQLite support
  • Improvements to data type handling, especially in MS SqlServer

Discovered Checksum Issue: It was recently discovered that a change in the 3.0.5 release caused changeSets with <update> and <delete> changeSets with <where> clauses to compute a different checksum version than the 3.0.0-3.0.4 release. I decided to leave the 3.0.5 fix in because at this point, people would be affected by either leaving or reverting the change and keeping it in will preserve the bugfix. If you are upgrading from 2.x or 3.0.5+, this will not affect you. If you are upgrading from 3.0.0 through 3.0.4 and have no <update> or <delete> changeSets, this will not affect you. If you do run into this, you simply have to null out the md5sum column in databasechangelog for the affected changesets. This can be done either through an “update databasechangelog set md5sum=null” call or a more targeted ”update databasechangelog set md5sum=null where id=’AFFECTED_ID’ and author=’AFFECTED AUTHOR’”. There is also a “liquibasec learCheckSums” command that runs the update query.

Download

Download Liquibase from http://liquibase.org/download or from the Maven repository as it winds its way through the mirror process. Visit the user forums if you have any questions.

All Closed Issues

  • [CORE-1247] – [Sqlite] bad syntax in create table statements with single autoincrement primary key
  • [CORE-1275] – LoadData insert statements do not escape column names containing an open paren
  • [CORE-1312] – Error when creating changelog tables
  • [CORE-1399] – IncludeAll Failing when running in WAR files
  • [CORE-1440] – Invalid Reorg table statement gets generated on DB2
  • [CORE-1504] – dbDoc should html-encode author names
  • [CORE-1506] – updateSQL generates invalid SQL for oracle
  • [CORE-1507] – dropAll fails with NullPointerException
  • [CORE-1509] – Memory improvements for large sqlFile files
  • [CORE-1510] – Maven plugin fails to configure parameters within property file with trailing spaces, error message misleading
  • [CORE-1511] – modifyDataType truncates enum values
  • [CORE-1512] – Insert with valueClobFile fails with unicode encoding.
  • [CORE-1515] – Liquibase MSSQL: Snapshot incorrectly injecting size for some datatypes
  • [CORE-1516] – Liquibase MSSQL: Snapshot recording incorrect size for VARBINARY
  • [CORE-1517] – Liquibase MSSQL: Autoincrement property of decimal datatype not supported
  • [CORE-1518] – Liquibase MSSQL: Incorrect datatypes captured in the snapshot
  • [CORE-1520] – Liquibase Snapshot: Default datetime is wrong
  • [CORE-1521] – When generateChangeLog is run, objects do not always come back in a consistent order
  • [CORE-1522] – PreparedStatement.setCharacterStream() not supported by Postgres JDBC driver.
  • [CORE-1524] – Ant diff command running diffChangeLog
  • [CORE-1525] – Liquibase MSSQL: Snapshot not capturing alter statements that add default values
  • [CORE-1526] – Unicode string escaping in MSSQL
  • [CORE-1530] – Column called VERSION is quoted in PostgreSQL
  • [CORE-1531] – includeAll with relativeToChangeLogFile fails under certain conditions
  • [CORE-1532] – NPE in ChangedIndexChangeGenerator
  • [CORE-1534] – Single quotes in liquibase.bat causing issues
  • [CORE-1519] – Allow relative file paths for valueClobFile and valueBlobFile inserts/updates.
  • [CORE-1533] – Performance improvements in dropAll

Liquibase Survey 2013

$
0
0

One problem with running an open source project is that we don’t really have “customers” to contact for feedback and product suggestions. I can definitely just add features that I think make sense, but one thing I’ve learned is that people use Liquibase in amazing ways I would never have imagined.

That is where the Liquibase survey comes in: it is your chance to provide feedback on how you use Liquibase and what is important to you so that I can better prioritize efforts over the next year.

Your participation and time is greatly appreciated.

—–> Liquibase Survey 2013 Form <—–

 

If you know others that use Liquibase, please forward them the survey as well.

Even better, if you know someone who is NOT using Liquibase, send them the survey as well.

The more information I can gather the better picture I will have.


Liquibase Survey Ends November 15th

$
0
0

If you haven’t yet filled out the Liquibase 2013 Survey now is the time–it will be available only through the end of Friday, November 15th.

There have been some great comments and feedback so far and thank you to everyone who has taken the time so far to submit a response.

For those interested, I will post a summary of the results before the end of November.

—–> Liquibase Survey 2013 Form <—–

 

Liquibase-Hibernate Extension 3.1 Released

$
0
0

The Liquibase hibernate extension has been updated for both hibernate 3 and hibernate 4.

This release adds support for catching changes to sequences and unique constraints as well as a few bugs around data type handling.

See https://github.com/liquibase/liquibase-hibernate for more information and to download the 3.1 release.

 UPDATE: A null pointer issue was found in the 3.1 release and fixed in a now available 3.2 release.

Experimental Amazon Redshift Support

$
0
0

A new Liquibase-Redshift extension is now available at https://github.com/liquibase/liquibase-redshift. If you are interested in trying out Liquibase with Amazon Redshift, give it a try and let me know how well it works.

You can download the most recent builds from the “releases” tab.

Liquibase 3.0.8 Released

$
0
0

Liquibase 3.0.8 is officially released. It is purely a bugfix release that covers improvements to data type handing, performance improvements, and much more.

Download

Download Liquibase from http://liquibase.org/download or from the Maven repository as it winds its way through the mirror process. Visit the user forums if you have any questions.

All Closed Issues

  • [CORE-1224] – Enum column types are not appropriately represented in the change log created by generateChangeLog
  • [CORE-1299] – modifyDataType does not auto reorg on DB2
  • [CORE-1302] – MySQL syntax for autoincrement column with start value
  • [CORE-1357] – Postgresql sequences create error in log files
  • [CORE-1368] – Unable to recreate DB from generated change logs
  • [CORE-1427] – Not generateChangeLog properly for INT2 type for Postgres
  • [CORE-1430] – When I was in sybase database using liquibase create the index, reported “information_schema.constraints” not found error
  • [CORE-1432] – Liquibase H2 InsertOrUpdateGeneratorH2 fails if primary key column name contains $ character
  • [CORE-1446] – Liquibase changelog generation can add linefeed to defaultValueComputed if last column
  • [CORE-1454] – Precondition negation does not seem to work
  • [CORE-1455] – Value not taken into account when inserting data with YAML
  • [CORE-1484] – very poor performance of dropAll on Oracle
  • [CORE-1496] – Custom Change validation happening before being fully initialized
  • [CORE-1531] – includeAll with relativeToChangeLogFile fails under certain conditions
  • [CORE-1537] – Liquibase: diffChangeLog on DB2 performing out of order steps
  • [CORE-1538] – diffChangeLog for DB2 injects invalid characters in xml
  • [CORE-1540] – Call ‘Reorg table’ after modifyDataType on DB2
  • [CORE-1541] – Column type=”LONGVARCHAR” fails
  • [CORE-1545] – Oracle wrong LONG datatype declaration
  • [CORE-1547] – CLONE – H2 (and other) support for BLOB and CLOB is incorrect
  • [CORE-1548] – Oracle Data Type: DATE – defaultValueComputed should be defaultValue
  • [CORE-1549] – Oracle Data Type: INTERVAL YEAR TO MONTH – returned at “INTERNAL(2) YEAR”
  • [CORE-1550] – Oracle Data Type: NCLOB – Receive SQL error when specifying NCLOB size
  • [CORE-1551] – Oracle Data Type: NCHAR
  • [CORE-1552] – Oracle Data Type: NVARCHAR2 – Column sizing is wrong
  • [CORE-1553] – dropDefaultValue does not work on SQL Server
  • [CORE-1554] – dbDoc for Informix IDS
  • [CORE-1555] – Oracle UID reserved word not detected
  • [CORE-1557] – Mysql: BLOB type changes to LONGBLOB
  • [CORE-1559] – Columns defined as “serial” are created as “int” without autoincrement in Postgres
  • [CORE-1562] – update throws Recoverable Exception
  • [CORE-1564] – Broken links in dbDoc
  • [CORE-1566] – DB2 Datatype – DBCLOB, GRAPHIC, VARGRAPHIC doubling datatype size
  • [CORE-1567] – DB2 Datatype – defaultValueComputed being used instead of defaultValue for DBCLOB, TIME, TIMESTAMP, DATE
  • [CORE-1568] – DB2 Datatype – REAL and XML should not have datatype sizes
  • [CORE-1571] – updateDatabase can’t find a changelog
  • [CORE-1572] – Regression: diff generates full schema instead of changes when using liquibase-hibernate4
  • [CORE-1580] – Mysql SET type not handled correctly
  • [CORE-1581] – modifyDataType ignores additional info of newDataType
  • [CORE-1582] – SQLServer datatype for TIMESTAMP
  • [CORE-1583] – Wrong datatype with renameColumn
  • [CORE-1584] – Unable do rollback not in transaction block
  • [CORE-1586] – MySQL DataType – defaultValueComputed being injected into TIMESTAMP, VARBINARY, BINARY, YEAR
  • [CORE-1587] – MySQL Datatype – VARBINARY vs LONGBLOB confusion
  • [CORE-1588] – MySQL DataType – BIT size and default not captured on Snapshot
  • [CORE-1589] – MySQL DataType – BLOB becomes LONGBLOB
  • [CORE-1590] – MySQL DataType – DOUBLE sizing not persisted on snapshot
  • [CORE-1591] – MySQL DataType – TIME not persisting seconds (getting hours and minutes..so I’ve got that going for me.)
  • [CORE-1592] – MySQL DataType – TEXT converted to LONGTEXT
  • [CORE-1594] – PostgreSQL ‘bigserial’ type is automatically converted to ‘bigint’
  • [CORE-1595] – Schema version incompatibility is logged as INFO instead of WARN
  • [CORE-1596] – Liquibase 3.0.5 will not create tables in dbo schema in SQL Server
  • [CORE-1597] – ORA-01000: maximum open cursors exceeded
  • [CORE-1600] – “Collation” and “Lateral” are not escaped in Postgres (new reserved words in v9.3)
  • [CORE-1602] – DatabaseException in changesets that include date fields with default values
  • [CORE-1603] – MySQL Datatype – BIGINT, INT, MEDIUMINT, SMALLINT, TINYINT all “shaving” off sizes
  • [CORE-1606] – MySQL – TEXT vs. LONGTEXT for diffChangeLog presents CLOB
  • [CORE-1607] – MSSQL java.sql.Types.TIMESTAMP should map to DateTime
  • [CORE-1610] – MSSQL – NTEXT type being snapshot with MSSQL driver default size parameter.
  • [CORE-1611] – Avoid reverse DNS lookup with getLocalHost().getHostName();
  • [CORE-1612] – YAML/JSON changelogs not picking up “value” attribute on column configs
  • [CORE-1614] – mysql case insensitive affects databasechangelog creation
  • [CORE-1615] – Failed to drop default value in MSSQL
  • [CORE-1616] – SQLFileChange uses too many file descriptors
  • [CORE-1619] – MSSQL: preconditions treat object names in a case-sensitive way
  • [CORE-1622] – Ant not respecting diffTypes=data
  • [CORE-1623] – MSSQL: precondition primaryKeyExists doesn’t work
  • [CORE-1625] – H2 Blob Type support is incorrect
  • [CORE-1626] – createIndex does not work for function based indexes anymore
  • [CORE-1627] – Option ‘diffTypes’ does not accept type ‘indexes’
  • [CORE-1632] – It’s impossible to setup Logger’s log level with system property ‘liquibase.defaultlogger.level’
  • [CORE-1636] – Case sensitivity issue with tableExists precondition
  • [CORE-1640] – foreignKeyExists precondition always failing
  • [CORE-1641] – Add column with foreign key throws NPE
  • [CORE-1644] – ValidationFailedException after update to 3.0.7
  • [CORE-1646] – Exception when comparing two schemas
  • [CORE-1647] – Mysql enum default values not quoted
  • [CORE-1648] – Mysql columns with colons and other special chars are not quoted
  • [CORE-1664] – MSSQL. “DATE” type doesn’t exist for MSSQL 2005 and 2000.
  • [CORE-1382] – Allow to create DATABASECHANGELOG* tables in another schema
  • [CORE-1546] – Schema-Support on Informix
  • [CORE-1577] – Oracle tinyint, smallint, int being created as number(38,0)
  • [CORE-1604] – Minor maven pom cleanups
  • [CORE-1635] – Generated changelog missing unique constraints should be output before foreign keys

Liquibase 3.1.0 Released

$
0
0

Liquibase 3.1.0 has been released.  For most people 3.1 is a drop in replacement for 3.0.

If you use <includeAll> with relative paths or are running against MaxDB, DB2 for iSeries, or InterSystems Cache make sure you read the  upgrade guide.

 

Besides bugfixes, 3.1 adds the following major features:

Offline Database Support!

One of the most requested features is the ability to use Liquibase when you do not have direct access to the database. We have always had updateSql support, but it still required a database connection to know what has been ran and what type of database to generate SQL for.

With the new “offline” support, you can now define a database connection URL like “offline:mysql” or “offline:oracle?version=11.1” when you run updateSql.

In offline mode, the change history is tracked in a local csv file which can be controlled with the “changeLogFile” URL parameter. For example: offline:mysql?changeLogFile:/home/db/changelog.csv

For more information, see the offline database documentation

Alternate Changelog History Tracking

With 3.1, you can now create extensions that manage changelog history tracking differently than the standard “DATABASECHANGELOG” table. For example, https://github.com/liquibase/liquibase-filechangelog allows you to manage your changelog history using a local file rather than a table in the database.

New and Improved Change tags:

  • <createProcedure>now supports referencing an external file containing the procedure definition with a new “path” attribute
  • <createProcedure> now supports a dbms attribute to target the database(s) the procedure is compatible with. This allows you to have a single changeSet with a procedure definition for each supported database
  • New <dropProcedure> change
  • <addColumn> supports new “beforeColumn”, “afterColumn” and “position” attributes to control column ordering
  • <sqlFile> files support ${} parameters

New and Improved Precondition tags:

  • <foreignKeyConstraintExists> now supports checking based on table and column definition. Not just constraint name
  • New <tableIsEmpty> precondition
  • New <rowCount> precondition

Database Support Improvements

  • MySQL ENUM and SET type support improvements
  • MySQL support for date/time/timestamp size parameter
  • MySQL support for column remarks
  • MS SqlServer support for sequences (2012+)
  • Sybase general support improvements
  • DB2 general support improvements

Extension/API Improvements

  • liquibase.changelog.visitor.ChangeExecListener implementations are notified of precondition and change-level interactions
  • SnapshotGenerator extensions can block incorrect functionality from other SnapshotGenerators
  • Extensions can define custom XSDs and namespaces

Other Features and Improvements

  • Formatted SQL now supports a comma-separated list in “dbms” targeted changeSets
  • Maven support for futureRollbackSql command

Links

Liquibase 3.1.1 Released

$
0
0

Liquibase 3.1.1 has been released with a few bug fixes.

The most important fixes reverts how <createProcedure> checksums are computed so they are compatible with 3.0 and fix the new <rowCount> and <tableIsEmpty> preconditions.

The newest version can be download from liquibase.org/download

Change log:

  • [CORE-1704] – Checksum errors for changeSets with createProcedure in 3.1.0 vs 3.0.x
  • [CORE-1707] – TableRowCountGenerator shouldn’t pass tableName as catalogName
  • [CORE-1710] – Oracle: NUMBER data type size specification is deployed with a precision specifier even though precision isn’t specified in the change log
  • [CORE-1711] – rowCount doesn’t work if only the tableName is given
  • [CORE-1713] – liquibase.precondition.core.ForeignKeyExistsPrecondition exception
  • [CORE-1715] – 2 -> 3.1 migration, 3.1 errors if there are single quotes in comments
  • [CORE-1709] – generateChangeLog returns tables created by Materialized Views as standard tables

 

Liquibase-Hibernate Extension 3.3 Released

$
0
0

The Liquibase hibernate extension has been updated for both hibernate 3 and hibernate 4.

Major changes include:

  • Support for Liquibase 3.1.1
  • Support for Hibernate 4.3+ NOTE: Due to hibernate incompatibilities, Hibernate 4.0-4.2 requires the use of the liquibase-hibernate4.2 extension
  • Support for compound primary keys
  • Improved support for detecting auto-increment columns

See https://github.com/liquibase/liquibase-hibernate for more information and to download the 3.3 release.

The new versions are also working their way through the maven mirror system

 


Liquibase talk at Percona Live

$
0
0

I’ll be giving a talk at Percona Live in Santa Clara on April 3rd titled “Liquibase: Source Control For Your Schema“.

It is a beginner-level course covering Liquibase basics plus some best practices. More information

If you will be there, stop by and say hi. It’s always great to hear from people using or considering using Liquibase. If you have not yet registered, use the promotional code “SeeMeSpeak” for a 10% discount.

Slides From Percona Live Talk

Liquibase 3.2.0 Released

$
0
0

Liquibase 3.2.0 has been released. As usual, it can be downloaded from the Liquibase download page and is available in the Maven repository as org.liquibase/liquibase-core.

For most users, upgrading will be seamless but if you have written Liquibase extensions there have been some API changes. See http://www.liquibase.org/v3_2_upgrade.html for details.

Updated Extensions

The following extensions have been updated to work with 3.2.0 and/or include bugfixes:

Major new features and changes in 3.2.0 include:

And/Or/Not logic in context expressions

Context attributes can now include complex expressions such as “qa or (production and master)”. See the context documentation for more information

Improved JSON and YAML changelog parsing

The changelog parsing logic has been greatly refactored to provide full feature parity between the XML, JSON, and YAML parsers.

New Command: Snapshot

The command line interface supports a new “snapshot” command that will output a report of the objects Liquibase sees in a database. This is the model that would be fed into diff/diffChangeLog operations but doesn’t perform any comparison logic, is simply reports on what it sees.

Liquibase SDK

The Liquibase SDK will provide utilities and features not needed for standard Liquibase usage such as testing tools and extension writing help. The 3.2.0 release provides the first pieces of the SDK:

  • Offline Javadoc
  • A starter/example workspace
  • Ability to generate vagrant configurations for various databases
  • “Watch” command to provide a simple real-time view of the database schema

For more information on the SDK, see the SDK Documentation.

Improved Performance

Various improvements in memory usage and optimizations in database interactions

DatabaseChangeLog SQL available with Offline Database

New “outputLiquibaseSql” flag allows inclusion of DatabaseChangeLog table create/insert statements with updateSql command

And Much More:

  • [CORE-209] – Double Create Database Lock Table using updateSQL
  • [CORE-421] – NPE in MySqlDatabaseSnapshot during diff operation when “enum” or “timestamp” column was removed from table
  • [CORE-461] – Wrong datatypes for timestamps generated with generateChangeLog
  • [CORE-871] – Unable to use changeSetPath in rollback tag to refer to another change log file
  • [CORE-877] – Bug with column type “TIMESTAMP WITHOUT TIME ZONE”
  • [CORE-976] – GenerateChangeLog with data: java heap space error
  • [CORE-1097] – Liquibase adds a semicolon after a stored proc definition making the stored proc unusable
  • [CORE-1108] – Oracle : Unable to create complex primary key for loadUpdateData
  • [CORE-1284] – Memory leak in ExecutorService
  • [CORE-1563] – dropAll does not delete Sequences on Derby
  • [CORE-1572] – Regression: diff generates full schema instead of changes when using liquibase-hibernate4
  • [CORE-1578] – changeset checksum calculates differently on linux and windows
  • [CORE-1601] – updateSql generates SQL with unexpected linefeeds, breaks SQLPlus
  • [CORE-1642] – Special character issue after upgrade
  • [CORE-1643] – DB2: defaultSchemaName and changelogSchemaName are not respected
  • [CORE-1650] – dropAll doesn’t work on Informix
  • [CORE-1668] – defaultSchemaName ignored on createTable in H2
  • [CORE-1673] – Empty default value is not recorded for MySQL
  • [CORE-1676] – Colons in changeSet IDs no longer supported
  • [CORE-1688] – The ‘valuum’ extension seems not to be working under version 3.0.8 of liquibase
  • [CORE-1701] – Oracle: snapshot of default date/time values come back as to_date functions
  • [CORE-1714] – 2->3.1 migration error
  • [CORE-1715] – 2 -> 3.1 migration, 3.1 errors if there are single quotes in comments
  • [CORE-1718] – foreignKeyConstraintExists precondition fails with constraints on unique keys
  • [CORE-1721] – HsqlDatabase.escapeObjectName(…) ignores QUOTE_ALL_OBJECTS
  • [CORE-1727] – Drop default constraint syntax for DB2 not correct
  • [CORE-1728] – Only sequence name is captured by snapshot process and used in generateChangeLog
  • [CORE-1733] – Data in diffChangeLog coming through as one row per changeSet
  • [CORE-1734] – updateSQL is not including content from sqlFile (at least not when ran from Linux)
  • [CORE-1739] – Liquibase ignores Oracle varchar precision
  • [CORE-1743] – Snapshot VARCHAR(MAX) correctly on sqlserver
  • [CORE-1744] – Derby: UpdateSQL not including creating databasechangeloglock table if needed
  • [CORE-1748] – Maven Plugin does not use outputDefaultCatalog property
  • [CORE-1750] – liquibase-modify-column 3.0 broken with liquibase-core 3.1.1
  • [CORE-1752] – Oracle XML Datatype snapshot containing size
  • [CORE-1753] – HSQLDB 1.8 does not support catalogs
  • [CORE-1754] – Default value functions on Oracle snapshoted as “defaultValue”
  • [CORE-1755] – DefaultValueComputed is quoted for Char, Varchar, Clob, MediumInt and SmallInt types
  • [CORE-1756] – Oracle indexes with functions not returned correctly in generateChangeLog
  • [CORE-1765] – Failed to drop a VIEW pointing on not existing table from another schema
  • [CORE-1767] – Oracle snapshot not capturing all indexes
  • [CORE-1772] – Informix cannot drop constraints
  • [CORE-1774] – Autocommit not restored on close in SpringLiquibase
  • [CORE-1775] – Informix error when creating primary key
  • [CORE-1779] – User Defined Types Come back with Unnecessary Size specifier in diff
  • [CORE-1782] – dropALL fails when tables are referenced by other tables in another schema
  • [CORE-1784] – GenerateChangeLog with objects in multiple schemas returns objects from multiple schemas and empty createTable statements
  • [CORE-1788] – dropAll does not work in not default schemas using postgresql
  • [CORE-1794] – Drop index failing for sybase
  • [CORE-1797] – Autoincrement on type Serial8 fails
  • [CORE-1798] – Invalid type syntax in Informix for Int(10) and SMALLINT(5) and FRACTION(3)
  • [CORE-1799] – Attempted recreation of DATABASECHANGELOG in informix
  • [CORE-1817] – Foreign Key Constraints Built on Unique Constraints are not captured in generateChangeLog
  • [CORE-1818] – SQL Server “smalldatetime” converted to “datetime” on update
  • [CORE-1824] – GUID Default values not quoted correctly in MSSQL
  • [CORE-1828] – sqlFile should fail when file does not exists
  • [CORE-1831] – CREATE/DROP INDEX issue: Sybase ASE 15.7.0
  • [CORE-1834] – generateChangeLog creates DOUBLE(22) instead of double in MySql
  • [CORE-1840] – Liquibase fails when run on a computer that can’t connect to the internet
  • [CORE-1843] – includeAll does not alphabetize classpath loaded files
  • [CORE-1853] – Liquibase generates invalid SQL for ‘character varying’ type
  • [CORE-1856] – Ability for Change classes to verify update and rollback succeeded
  • [CORE-1859] – DataTypeFactory doesn’t take database into account
  • [CORE-1861] – MSSQLDatabase.isCaseSensitive() provides a wrong information
  • [CORE-1878] – Maven plugin behaviour different than command line with the same parameters
  • [CORE-1881] – Case sensitivity issue with tableExists precondition
  • [CORE-1893] – type=”DATETIME” in changelog is converted to TIMESTAMP in MySql
  • [CORE-1899] – Non-existing referenced sql files doesn’t report error
  • [CORE-1901] – DropPrimaryKey – Fails in Postgres
  • [CORE-1906] – Diff between objects in different named default schemas doesn’t see them as the same object
  • [CORE-1912] – Unit tests fail due to dependency on system time zone
  • [CORE-1116] – Allow for both “AND” and “OR” specifications of which contexts to run
  • [CORE-1422] – Support changeset comments in formatted SQL
  • [CORE-1536] – Support specifying the referenceDefaultSchemaName for diff operations
  • [CORE-1635] – Generated changelog missing unique constraints should be output before foreign keys
  • [CORE-1682] – More machine-independent handling of filesystem-located resources
  • [CORE-1695] – Better handling of Postgres timestamp with/without time zone
  • [CORE-1706] – Excessive reading from databasechangelog table
  • [CORE-1726] – Added offline parameter to generate insert databasechangelog statements
  • [CORE-1758] – Add outputDefaultSchema flags to ant
  • [CORE-1776] – System-independent checksums
  • [CORE-1823] – Search for liquibase.properties in classpath in additional to local filesystem
  • [CORE-1874] – Improve XML and other parsers for better extensiblity
  • [CORE-1905] – Yaml parser supports .yml extension as well as .yaml
  • [CORE-1686] – Add Support for Pivotal’s SqlFire database to Liquibase
  • [CORE-1742] – Standardized system for managing configuration options in core and extensions
  • [CORE-1751] – More detailed API for returning changeSet statuses
  • [CORE-1783] – Command line option: snapshot
  • [CORE-1815] – Liquibase SDK command to easily watch database
  • [CORE-1821] – Snapshot listener interface

Adding Liquibase on an Existing project

$
0
0

The Quick Start Guide works well for starting Liquibase on a new project because your empty changelog file matches your empty database. However, when you have an existing project with an existing database things are more complicated.

Unfortunately, there is no simple “this is how you do it” answer because there is so much variations in projects, processes and requirements. Liquibase provides many tools to help the process, but it is up to you to decide the best way to combine them for your particular situation.

When adding Liquibase to an existing project there are basically two approaches: “Make it look like you’ve always been using Liquibase” and “Just start using Liquibase”

Make it look like you’ve always been using Liquibase

The goal of this approach is to have a changelog file that matches the current state of your database. You can run this changeLog against a blank database and the final result will be indistinguishable from your existing databases–as if you used Liquibase from the beginning. This approach is usually the best long term, but it can be more work up front.

Create ChangeLog

Creating the changelog to match your database can be done automatically using the generateChangeLog command or be done manually. For any database larger than a few tables, the generateChangeLog command is usually a good idea but make sure you go through the generated changeSets to ensure they are correct. Liquibase does not always detect more complex structures like stored procedures or details like if an index is not clustered. Also, ensure data types are as you expected them.

Populate the DatabaseChangeLog table

Once you have your changeLog, you need a way to ensure that the pre-Liquibase changeSets are only ran on new, empty databases. The easiest way to do this is generally to use the changeLogSync or changeLogSyncSQL command to execute (or generate) the SQL that marks the starting changeSets as already ran without actually executing them.

As an alternative to the changeLogSync command, you can add contexts on the pre-Liquibase changeSets such as <changeSet ... context="legacy"> and when you run Liquibase on a new database you run with liquibase --contexts=legacy update and on an existing database you run with liquibase --contexts=non-legacy.

Finally, you can add <precondition onFail="MARK_RAN"> tags to the generated changeSets. For example, if you have a <createTable tableName="person"> changeSet, you would add <preconditions onFail="MARK_RAN"><not><tableExists tableName="person"/></not></preconditions> tag. Adding preconditions requires more changes to the changeLog file and introduces a performance penalty because Liquibase must check the database metadata for each changeSet the first run through, this approach is usually best used in isolated cases only.

What is the current state?

Often times a part of the reason to move to Liquibase is because your schemas have diverged over time, so an important question to answer is “If I’m making the changelog file match the current state, what is the current state?” Usually the best answer to that question is “the production database” but it can vary.

How divergent your schemas are will also affect which of the above techniques you use to populate the DatabaseChangeLog table, and it will often times make sense to use multiple approaches. For example, you may want to generate your base changeLogs from the production database and use changeLogSyncSQL to be able to mark them ran on everything from production down. Then you can add your non-released changeSets to the changeLog file with a precondition checking if it has already ran. That will allow Liquibase to automatically figure out the correct state for all your databases from development through production.

We are going to use Liquibase starting…..NOW!

Instead of building up a changeLog to match your existing database, you can instead just declare “from now on we are using Liquibase”. The advantage to this is that it much easier to set up because it is just a mandate. Usually this works best going from one version to the next because your databases are all in a reasonably consistent state and you simply start tracking database changes in your next version using Liquibase. Because Liquibase only looks at the DatabaseChangeLog table to determine what needs to run, it doesn’t care what else might be in your database and so it will leave all your existing tables alone and just run the new changeSets.

The biggest disadvantage to this approach is that you cannot bootstrap an empty database with Liquibase alone. A work-around is to take a pre-Liquibase snapshot using your database backup tool and use that as your database seed. Any time you need to create a new database, you first load in the seed and then run Liquibase update.

Depending on how much variation you have between your schemas, even with this approach you may need to rely on preconditions or a “mark changes ran” script in order to standardize and handle those variations.

People and Processes

Finally, remember that starting to use Liquibase–especially on an existing project–isn’t just about how you bootstrap your changeLog file. It is also a question of how you introduce Liquibase into your existing processes and culture.

For many companies and projects, everyone realizes the problems that need fixing and are on board with the advantages of change. For others, however, there can be entrenched interests and strong resistance similar to any other process change. Liquibase provides many tools and approaches that can be used to ease it into an existing process such as SQL outputSQL formatted changelogsdiffChangeLog and more that can be combined in ways that works best for your group.

If you know that introducing Liquibase is going to be complex, either from a technical or processes standpoint, it is usually best to introduce it slowly. Start with it on a new project as a trial run and once you have a good grasp of how it works and available options, apply it to other existing projects.

NOTE: This post has been incorporated into the documentation at http://www.liquibase.org/documentation/existing_project.html

Liquibase 3.2.1 Released

$
0
0

Liquibase 3.2.1 has been released. As usual, it can be downloaded from the Liquibase download page and is available in the Maven repository as org.liquibase/liquibase-core.

3.2.1 is purely a bugfix release. The only potential update issue could be a fix for incorrect checksums introduced in 3.2.0. If you used defaultValueNumeric, defaultValue or used createProcedure or sql tags you may have seen unexpectedly changed checksums with 3.2.0. With 3.2.1, those have been reverted back to the correct 3.1.x version. If you are updating from 3.1.x it will be a smoother update from 3.2.0. If you already updated to 3.2.1 and manually fixed your checksums in the databasechangelog table, they will need to be updated again.

Full change log:

  • [CORE-1844] – bulkFetch of foreign keys on Oracle is very slow
  • [CORE-1918] – Multiple comment blocks in changesets no longer works
  • [CORE-1920] – SpringLiqubase includeAll is not including files
  • [CORE-1922] – 3.2.0 Regression due to CORE-1721
  • [CORE-1923] – Error raised: Unknown Reason when doing tagging via command line
  • [CORE-1930] – Snapshot command returns no information on MSSQL
  • [CORE-1933] – [3.0.8 -> 3.2.0] pom.xml: 2Mb of superfluous dependencies
  • [CORE-1934] – file path in databasechangelog is absoulte since liquibase 3.2.0 when using includeAll inside a jar
  • [CORE-1936] – NullPointerException while diffing database against hibernate.cfg.xml
  • [CORE-1938] – defaultValueNumeric=”0″ or defaultValue=”0″ is translated to 0.0
  • [CORE-1940] – Maximum Oracle Sequence fails to be parsed as a BigInteger
  • [CORE-1944] – NullPointerException when tagging through Ant before applying changesets
  • [CORE-1947] – Liquibase dependency to jetty-servlet/velocity should be <optional>true</optional>
  • [CORE-1950] – Checksum validation failed after Liquibase upgrade (3.1.1 -> 3.2.0)
  • [CORE-1957] – Using VARCHAR2 column type fails for Hsqldb running in oracle syntax mode
  • [CORE-1960] – “Could not find implementation of liquibase.logging.Logger” starts appearing after migration from 3.1.1 to 3.2.0
  • [CORE-1970] – NullPointerException on rollback with <sqlFile> tag
  • [CORE-1746] – Support <sqlFile> parameters
  • [CORE-1951] – Regression on 3.2.0 : –diffTypes=data generates Unknown Reason Exception

UPDATE: There is still a couple checksum issues updating from 3.1.1 to 3.2.1. I’ll get those fixed up in a 3.2.2 release today or tomorrow.

Viewing all 200 articles
Browse latest View live