HHH-4457 SchemaUpdate fails on Sybase ASE 15 when a new column is added without a default value

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18245 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Strong Liu 2009-12-16 18:28:58 +00:00
parent 0776dbab9a
commit b50f0660ee
1 changed files with 6 additions and 7 deletions

View File

@ -321,14 +321,13 @@ public class Table implements RelationalModel, Serializable {
String defaultValue = column.getDefaultValue(); String defaultValue = column.getDefaultValue();
if ( defaultValue != null ) { if ( defaultValue != null ) {
alter.append( " default " ).append( defaultValue ); alter.append( " default " ).append( defaultValue );
}
if ( column.isNullable() ) { if ( column.isNullable() ) {
alter.append( dialect.getNullColumnString() ); alter.append( dialect.getNullColumnString() );
} }
else { else {
alter.append( " not null" ); alter.append( " not null" );
}
} }
boolean useUniqueConstraint = column.isUnique() && boolean useUniqueConstraint = column.isUnique() &&