File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
hibernate-core/src/main/java/org/hibernate/tool/schema/internal Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,11 @@ private static void appendColumnDefinition(
197197 }
198198 final String identityColumnString = dialect .getIdentityColumnSupport ()
199199 .getIdentityColumnString ( column .getSqlTypeCode ( metadata ) );
200- definition .append ( ' ' ).append ( identityColumnString );
200+ // the custom columnDefinition might have already included the
201+ // identity column generation clause, so try not to add it twice
202+ if ( !definition .toString ().toLowerCase (Locale .ROOT ).contains ( identityColumnString ) ) {
203+ definition .append ( ' ' ).append ( identityColumnString );
204+ }
201205 }
202206 else {
203207 final String columnType = column .getSqlType ( metadata );
You can’t perform that action at this time.
0 commit comments