Author: stliu
Date: 2009-12-16 13:21:52 -0500 (Wed, 16 Dec 2009)
New Revision: 18241
Modified:
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/mapping/Table.java
Log:
JBPAPP-2791 HHH-4457 - SchemaUpdate fails on Sybase ASE 15 when a new column is added
without a default value
Modified:
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/mapping/Table.java
===================================================================
---
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/mapping/Table.java 2009-12-16
14:25:53 UTC (rev 18240)
+++
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/mapping/Table.java 2009-12-16
18:21:52 UTC (rev 18241)
@@ -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