Skip to content

Commit

Permalink
0003836: Fix DDL creation of ROWID column for Oracle (3.10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichalek committed Dec 19, 2018
1 parent 7f7fc57 commit fef19b9
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -40,6 +40,7 @@
import org.jumpmind.db.model.ColumnTypes;
import org.jumpmind.db.model.Database;
import org.jumpmind.db.model.IIndex;
import org.jumpmind.db.model.PlatformColumn;
import org.jumpmind.db.model.Table;
import org.jumpmind.db.platform.AbstractDdlBuilder;
import org.jumpmind.db.platform.DatabaseNamesConstants;
Expand All @@ -53,6 +54,8 @@ public class OracleDdlBuilder extends AbstractDdlBuilder {
protected static final String PREFIX_TRIGGER = "TRG";

protected static final String PREFIX_SEQUENCE = "SEQ";

protected static final String ROWID_TYPE = "ROWID";

public OracleDdlBuilder() {
super(DatabaseNamesConstants.ORACLE);
Expand Down Expand Up @@ -530,5 +533,17 @@ protected void processChange(Database currentModel, Database desiredModel,
printEndOfStatement(ddl);
change.apply(currentModel, delimitedIdentifierModeOn);
}


@Override
protected String getSqlType(Column column) {
PlatformColumn platformColumn = column.findPlatformColumn(databaseName);
if (platformColumn != null && platformColumn.getType() != null
&& platformColumn.getType().equals(ROWID_TYPE)) {
return ROWID_TYPE;
} else {
return super.getSqlType(column);
}
}

}

0 comments on commit fef19b9

Please sign in to comment.