A new topic, 'Problems with defaultValueBoolean in MySQL', has been made on a
board you are watching.
You can see it at
http://liquibase.org/forum/index.php?topic=1304.new#new
The text of the topic is shown below:
I've the following changeset:
Code:
<changeSet id="add-new-column-changed_default_admin_password"
author="smontes">
<comment>Add new column changed_default_admin_password with default
value FALSE to configuration table</comment>
<addColumn tableName="configuration">
<column name="changed_default_admin_password" type="BOOLEAN" />
</addColumn>
<addDefaultValue tableName="configuration"
columnName="changed_default_admin_password"
defaultValueBoolean="FALSE" />
<addNotNullConstraint tableName="configuration"
columnName="changed_default_admin_password"
defaultNullValue="FALSE"
columnDataType="BOOLEAN" />
</changeSet>
If I apply the changeset in an empty table, I don't have any problem.
However, if table has already some data and I'm using MySQL I get the following
error:
Quote
[INFO] Error setting up or running Liquibase: Migration failed for change set
src/main/resources/db.changelog-1.0.xml::add-new-column-changed_default_admin_password::smontes:
Reason: liquibase.exception.DatabaseException: Error executing SQL UPDATE
`configuration` SET `changed_default_admin_password` = 'FALSE' WHERE
changed_default_admin_password IS NULL:
Caused By: Error executing SQL UPDATE `configuration` SET
`changed_default_admin_password` = 'FALSE' WHERE changed_default_admin_password
IS NULL:
Caused By: Incorrect integer value: 'FALSE' for column
'changed_default_admin_password' at row 1
LiquiBase is creating the new column as tinyint(1) and then it doesn't accept
FALSE as value.
This is only happens in MySQL while in PostgreSQL it's working fine.
Any idea about the possible problem?
Thanks,
Rego
Unsubscribe to new topics from this board by clicking here:
http://liquibase.org/forum/index.php?action=notifyboard;board=1.0
Regards,
The Liquibase Community Forum Team.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Liquibase-user mailing list
Liquibase-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/liquibase-user