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

SOX Compliance and Database Refactoring

$
0
0

Managing, tracking, and applying database changes is difficult, especially in an agile database environment where there are many changes made throughout a project’s life cycle. Even with a tool like Liquibase, It takes a lot of discipline to apply your database changes in a consistent and traceable manner.

For projects that need to deal with SOX-compliant releases the process is even more difficult because your release documentation needs to include not only how to update your database, but also how to roll back in case of a problem with the release.

It was to address this problem that we added automatic rollback support to Liquibase. For each changeSet in your change log file, Liquibase can (usually) generate rollback SQL. For changes that cannot be automatically undone (drop table, insert data, etc.), or if you want to override the default rollback method, you can specify a tag containing the correct SQL. This method of generating rollback commands works well because for most cases you don’t have to do anything, and when you do have to specify rollback SQL, it is stored along side the original change.

To control the generation of generating SQL for updating a database and for rolling it back, see the command line migrator documentation.


Liquibase 1.0.1 Released

$
0
0

1.0.1 is a minor bug fix release that addresses an issue with null values in the defaultValue attribute being quoted.

Start With Simple Evolutionary Database Design

$
0
0

Reg Developer in the UK recently posted an interview with Scott Ambler about database refactoring at http://www.regdeveloper.co.uk/2007/07/04/evolutionary_database_design/.

In the interview, he discusses questions developers and DBAs often have when first approaching evolutionary database design (EDD). The two main points he covers are:

  1. Having both developers and DBAs involved in the database design process is an improvement over “traditional” waterfall-style databases designed only by the DBA.
  2. If you make your schema changes with triggers and views correctly, you can have a “transition window” that will allow you to make your changes without breaking existing systems that use the database.

While I agree with both these points, I worry about his focus on “transition window” database refactoring methods. There is certainly value in being able to provide these windows for databases that have many independent systems depending on them, but I think that for the vast majority of projects it makes database refactoring seem too difficult to even attempt.

I would propose that more focus needs to be placed on the simpler aspect of EDD: databases that are specific to a single system or set of related systems that are all managed and updated in a frequent, agile manner. These are the teams most likely to adopt an EDD process and there is still a lot of work to get them the tools they need to work efficiently.

In the interview, Scott says that “right now we’re at the beginning of the adoption curve” in regards to EDD and I agree with that. So–for now–let’s focus on the needs of the majority of those early adopters.

I see the tools and practices required to do EDD efficiently as a spectrum that range from a single-project database with no DBA, through a set of related projects with a part time DBA involved, to a database that supports a large set of independent systems that is under the constant care of a DBA. “Transition Window” methods of database refactoring work great for the high end of the spectrum and I don’t think it should be ignored because it is important to know that a process can scale.

For now, however, we need to start a the simple end and build a strong foundation of tools and techniques before working our way up the stack to the top. There is the start of the required tools in the form of DBUnit for unit testing and Liquibase for managing refactorings, but there is still large holes including IDE support for refactorings, best practices and pattern catalogs for database testing, and more.

Liquibase 1.1 Released

$
0
0

Liquibase 1.1 has been released. Major new features include:

  • Support for additional databases: DB2, Derby, Sybase (not fully tested), and HSQL

  • Support for “unsupported” databases

  • Database Diff Tool

  • Database Creation Script Generator

  • new DBMS attribute on change set tag that allows you to specify what databases to run the change set against

  • “verify” command that checks for change log problems without attempting to execute any

  • “status” command that shows information on unrun change sets

  • Handle date/time and numeric values better on inserts and setting default values

  • Bug Fixes

Upgrading is simply a matter of replacing the liquibase.jar file. To take advantage of newer change log features, change your XSD declaration to:

<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.1
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.1.xsd">

Download Liquibase 1.1

Liquibase 1.1.1 Released

$
0
0

Liquibase 1.1.1 has been released to address issues found with the diff tool in the 1.1 version.

Revenge of the Mock Tests

$
0
0

If you didn’t see, version 1.1.1 of Liquibase was released the day after 1.1 because of problems reported by users with the new diff tool.

Now, we could simply say “it’s a new feature, you should expect bugs”, but they were pretty obvious ones that should have been caught by simply executing the diff tool against all our supported databases. A simple unit test or two that actually ran the diff tool exposed the bugs and they were easy to catch.

Why weren’t those tests wrote before the 1.1 release? It was because I was testing with a mock database connection which didn’t capture all the idiosyncrasies of different databases. The tests were there, and the coverage was there, but there were still bugs because of limitations in the (mock) abstraction layer.

The lesson to be learned is that when writing database access level code, never use a mock database connection.

Liquibase IDE and Eclipse Plug-in 0.5

$
0
0

I have released the initial version of a Liquibase IDE. The idea behind it is to do for database refactoring what refactoring tools like IntelliJ and Eclipse have done for code refactoring.

The initial release is intended primarily to look for feedback from users and from people with experience writing Eclipse plug-ins and RCP applications.

Current functionality includes:

  • Applying refactorings to a database and having them stored in a change log file
  • Executing a change log file against a database
  • Tagging a database

While the functionality may be a bit rough around the edges (not a lot of validation, will probably get an error message or two) it is functionally complete for creating and applying changes.

Plans for the final 1.0 release include interfaces for rollbacks and rollback-management, database diffs, and more.

If you would like to help out with the development of the IDE/plug-in or would like to create a similar plug-in for your favorite IDE, please let me know. It is a very large undertaking and I could use some help :)

Liquibase 1.2 Released

$
0
0

Liquibase 1.2 has been released. Major features include:

  • Support for H2 database
  • Support for InterSystems Cache database
  • Support for <sqlfile> change
  • Improved error messages
  • <sql> tag can contain a <comment> tag
  • Change log file references can be absolute
  • SQL in <sql> tag can be ; or ‘go’ delimited
  • New clearCheckSums command in command line migrator

  • Support for version 0.5 of the Liquibase IDE and Eclipse Plugin

Many bugs have been fixed as well, including:

  • Sybase support fixes
  • Handle –defaultsFile correctly
  • Handle command line parameters correctly on Windows systems
  • Other bug fixes

Upgrading is simply a matter of replacing the liquibase.jar file. To take advantage of newer change log features, change your XSD declaration to:

<databasechangelog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.2"
     xsi="http://www.w3.org/2001/XMLSchema-instance"
     schemalocation="http://www.liquibase.org/xml/ns/dbchangelog/1.2
     http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.2.xsd">

Download Liquibase 1.2


Liquibase 1.2.1 Released

$
0
0

Liquibase 1.2.1 is a minor bugfix release to address the following issues:

  • Ordering of default values and not null clauses on some databases including Oracle

  • Sequences were not included in the generateChangeLog output The update is available on the download page

Liquibase IDE 0.6 Released

$
0
0

Version 0.6 of the Liquibase IDE and the Eclipse Plug-in have been released. This version does not add new functionality, but does fix a showstopper bug that prevented the creation of change log files.

Information on downloading the new version is available on the download page.

Refactoring IDE Demo

$
0
0

A quick demo of the Liquibase Database Refactoring IDE is now available on the Liquibase site.

It shows how to connect to your database, apply several refactorings to your database, then update an independent database with the new changes–all from the comfort of an IDE environment.

The IDE is available as either a stand-alone tool or as an Eclipse plug-in.

View the demo

More Information

Liquibase 1.3 Released

$
0
0

Liquibase 1.3 has been released. Major features include:

Many bugs have been fixed as well, including:

  • Restored Java 6 Support
  • Absolute path changelogs are handled correctly on Windows
  • Other bug fixes

Upgrading is simply a matter of replacing the liquibase.jar file. To take advantage of newer change log features, change your XSD declaration to:

<databasechangelog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.3";
    xsi="http://www.w3.org/2001/XMLSchema-instance";
    schemalocation="http://www.liquibase.org/xml/ns/dbchangelog/1.3
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.3.xsd">

Download Liquibase 1.3 from: http://www.liquibase.org/download.html

Liquibase Grails Plugin

Initial Liquibase IntelliJ IDEA Plug-in Released

$
0
0

For you IntelliJ IDEA users out there, there is now a Liquibase plugin available through the Intellij plug-in manager.

  • Like the Eclipse plug-in, the IntelliJ plugin allows you to refactor your database like you refactor code using a “Refactor” context menu on database objects. These changes are automatically saved to a change log file.

  • A “Liquibase” context menu on the database explorer allows you to migrate your database, roll back changes, generate documentation, and more.
  • Additional refactoring and better documentation will be added in upcoming releases.
  • As usual, please let us know if you have any questions or suggestions.

Liquibase Core 1.4.0 Released

$
0
0

Liquibase 1.4.0 has been released. Major features include:

  • IntelliJ Plug-in Support
  • Added support for specifying schemas in change log
  • MaxDB/SAPDB Support
  • Refactored Code
  • Can specify data types as java.sql.Types.*
  • Support for composite foreign keys
  • Improved Maven support
  • Bug Fixes

Upgrading is simply a matter of replacing the liquibase.jar file. To take advantage of newer change log features, change your XSD declaration to:

<databasechangelog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.4"
    xsi="http://www.w3.org/2001/XMLSchema-instance"
    schemalocation="http://www.liquibase.org/xml/ns/dbchangelog/1.4
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.4.xsd">

Download Liquibase 1.4 from: http://www.liquibase.org/download.html


Liquibase at JavaOne? Cross your Fingers!

$
0
0

I submitted a JavaOne 2008 session into the call for papers. I went for a combination of Liquibase usage and general database change management. Let’s hope I’m selected!

Liquibase Overview Videos

$
0
0

I have made two Liquibase overview videos available to help explain what Liquibase is and some of its capabilities. One is very brief (6 minutes) while the other is a more in-depth 30 minute video.

I’m planning on adding additional videos in the future. If you have a suggestion on a topic you would like covered, please let us know.

The videos are available in the new training section of the website.

Liquibase 1.4.1: Core, IntelliJ, and Grails

$
0
0

Liquibase Core 1.4.1 has been released. This is primarily a bug fix release.

Upgrading is simply a matter of replacing the liquibase.jar file.

Download Liquibase Core 1.4.1 from:

http://www.liquibase.org/download.html

The IntelliJ plug-in has also been updated to support 1.4.1. It can be installed or updated through the IntelliJ plug-in manager.

The Grails plug-in has also been updated to support 1.4.1. It is installed through the standard grails plug-in infrastructure.

As usual, let me know of any issues or suggestions you have

Official Maven Support

Japanese Documentation Complete

$
0
0

I would like to thank Yasuo Honda for all his hard work on the Japanese translation of the Liquibase documentation. He was also a great help in determining the best wiki tool to use to support translations.

If you are interested in assisting with translating the Liquibase documentation, feel free to edit the site wiki directly, or contact the documentation mailing list for more information.

You can view the Japanese translation by starting at http://www.liquibase.org/ja/home or by clicking the “ja” box on any page.

Viewing all 200 articles
Browse latest View live