Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add meaningful error message when precondition fails
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Apr 20, 2015
1 parent 0f36c37 commit 83fc0e8
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -4,9 +4,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">

<!-- This precondition changeset might fail if:
(a) CreateTableGeneratorInnoDB stops working (eg Liquibase upgrade), or
(b) someone creates a non-InnoDB table in Zanata's schema.
-->
<changeSet author="sflaniga@redhat.com" id="check-innodb" runAlways="true"
dbms="mysql">
<preConditions onFail="HALT">
<preConditions onFail="HALT" onFailMessage="All tables in the schema must be InnoDB: ALTER TABLE table_name ENGINE = INNODB">
<sqlCheck expectedResult="0">
SELECT count(*) FROM information_schema.tables
WHERE TABLE_SCHEMA = SCHEMA() AND engine != 'InnoDB'
Expand Down

0 comments on commit 83fc0e8

Please sign in to comment.