Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 3.15 KB

databases.markdown

File metadata and controls

45 lines (36 loc) · 3.15 KB

====== Supported Databases ======

Due to variations in data types and SQL syntax, the following databases are currently supported out of the box. Additional databases as well as enhancements to support for the below databases are available through [[http://liquibase.org/extensions|Liquibase extensions]]

Please find further information about which jdbc driver, url, classes etc. these databases need, with clicking on the specific link.

^ Database ^ Type Name ^ Notes ^ | [[MySQL]] | mysql | No Issues | | [[PostgreSQL]] | postgresql | 8.2+ is required to use the "drop all database objects" functionality. | | [[Oracle]] | oracle | 11g driver is required when using the diff tool on databases running with AL32UTF8 or AL16UTF16 | | [[MS-SQL]] | mssql | No Issues | | [[Sybase Enterprise]] | sybase | ASE 12.0+ required. "select into" database option needs to be set. Best driver is JTDS. Sybase does not support transactions for DDL so rollbacks will not work on failures. Foreign keys can not be dropped which can break the rollback or dropAll functionality. | | [[Sybase Anywhere]] | asany | //Since 1.9// | | [[DB2]] | db2 | No Issues. Will auto-call REORG when necessary. | | [[Apache Derby]] | derby | No Issues | | [[HSQL]] | hsqldb | No Issues | | [[H2]] | h2 | No Issues | | [[Informix]] | informix | No Issues | | [[InterSystems Caché]] | cache | No Issues | | [[Firebird]] | firebird | No Issues | | [[MaxDB / SAPDB]] | maxdb | No Issues | | [[SQLite]] | sqlite | //Since 1.8// No Issues |

====== Using Unsupported Databases ======

Since Liquibase is built on top of standard JDBC, the only ties it has to the underlying database is through the SQL that can vary from DBMS to DBMS. If you attempt to use Liquibase with an unsupported database, it will try to run and will most likely succeed. The only problem you are likely to run into is the current date/time function name. If Liquibase is unable to determine the correct date/time function, you can pass it in via the currentDateTimeFunction argument (see [[manual/command line]] and [[manual/Ant]]).

You may also run into problem with the SQL generated by the change/refactoring tags on unsupported databases. The best way to deal with this problem is to first try the standard change/refactoring tags. If it generates an error, you can fall back to the [[manual/custom sql| tag]] to code whatever change you need to make in a way that your database understands.

If, for some reason, the DatabaseChangeLog table cannot be created on your database, the base creation SQL that you can modify to suite your needs is:

CREATE TABLE DATABASECHANGELOG (id varchar(150) not null, author varchar(150) not null, filename varchar(255) not null, dateExecuted datetime not null, md5sum varchar(32), description varchar(255), comments varchar(255), tag varchar(255), liquibase varchar(10), primary key(id, author, filename))

Reasons for creating the DatabaseChangeLog table yourself include database that require null fields to be specified as such and index limitations that don't allow primary keys on fields as long. You can change the data types and or data type lengths all you want,