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/branches/Branch_3_3@18242 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Strong Liu 2009-12-16 18:23:19 +00:00
parent 9e90eff9e7
commit efda057078
1 changed files with 7 additions and 8 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() &&