Author: stliu
Date: 2009-12-16 13:23:19 -0500 (Wed, 16 Dec 2009)
New Revision: 18242
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/mapping/Table.java
Log:
HHH-4457 SchemaUpdate fails on Sybase ASE 15 when a new column is added without a default
value
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/mapping/Table.java
===================================================================
---
core/branches/Branch_3_3/core/src/main/java/org/hibernate/mapping/Table.java 2009-12-16
18:21:52 UTC (rev 18241)
+++
core/branches/Branch_3_3/core/src/main/java/org/hibernate/mapping/Table.java 2009-12-16
18:23:19 UTC (rev 18242)
@@ -321,15 +321,14 @@
String defaultValue = column.getDefaultValue();
if ( defaultValue != null ) {
alter.append( " default " ).append( defaultValue );
-
- if ( column.isNullable() ) {
- alter.append( dialect.getNullColumnString() );
- }
- else {
- alter.append( " not null" );
- }
-
}
+
+ if ( column.isNullable() ) {
+ alter.append( dialect.getNullColumnString() );
+ }
+ else {
+ alter.append( " not null" );
+ }
boolean useUniqueConstraint = column.isUnique() &&
dialect.supportsUnique() &&
Show replies by date