I am having a strange problem when trying to add a new column to a database.
If have changeset that has the following property details
- <property name="boolean.type"
value="boolean" dbms="postgresql, hypersql,
hsqldb"/>
<property name="boolean.type" value="bit" dbms="mysql"/>
<property name="boolean.type" value="smallint" dbms="derby"/>
<property name="boolean.type" value="numeric(1)" dbms="oracle"/>
Now if I use the following
- <changeSet author="UnicentaOpos - John
L" id="Create Categories
Table">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="CATEGORIES"/>
</not>
</preConditions> -
<createTable tableName="CATEGORIES">
<column name="ID" type="varchar(255)">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="NAME" type="varchar(255)">
<constraints nullable="false"/>
</column>
<column name="PARENTID" type="varchar(255)"/>
<column name="TEXTTIP" type="varchar(255)" defaultValue="NULL"/>
<column name="CATSHOWNAME" type="${boolean.type}" defaultValueBoolean="true">
<constraints nullable="false"/>
</column>
<column name="IMAGE" type="${blob.type}"/>
</createTable> - </changeSet>
The table is created ok, but
If a do the following to add the CATSHOWNAME column when it does not exist.
- <addColumn
tableName="CATEGORIES">
<column name="CATSHOWNAME" type="${boolean.type}" defaultValueBoolean="true">
<constraints nullable="false"/>
</column>
</addColumn>
I get the error that that smallint can hold the value of type Boolean.
Does any one have any Ideas why this is happening.
Thanks