defaultValue isn't respected when YAML format is used

Description

The defaultValue in yaml createTable column attributes are not used. Here is an example yaml changeset where the problem occurs:

databaseChangeLog: - changeSet: changes: - createTable: columns: - column: constraints: nullable: false defaultValue: Trustworthy name: is_untrustworthy type: VARCHAR(255) tableName: quick_tip author: justinc id: 1

And this is the SQL it generates:

CREATE TABLE consumer_dw.quick_tip (is_untrustworthy VARCHAR(255) NOT NULL);

In comparison, this XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" 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.1.xsd"> <changeSet author="justinc" id="1"> <createTable tableName="quick_tip"> <column defaultValue="Trustworthy" name="is_untrustworthy" type="VARCHAR(255)"> <constraints nullable="false"/> </column> </createTable> </changeSet> </databaseChangeLog>

Generates this SQL:

CREATE TABLE consumer_dw.quick_tip (is_untrustworthy VARCHAR(255) DEFAULT 'Trustworthy' NOT NULL);

Environment

ubuntu and mysql

Activity

Show:

Details

Reporter

Components

Affects versions

Priority

Created February 26, 2014 at 5:09 PM
Updated February 26, 2014 at 5:09 PM