Skip to content

Commit

Permalink
0003385: Creating a FULLTEXT index in MySQL or MariaDB is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpmind-josh committed Jan 19, 2018
1 parent 630d6eb commit b623c37
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Expand Up @@ -2323,6 +2323,9 @@ protected void writeExternalIndexCreateStmt(Table table, IIndex index, StringBui
if (index.isUnique()) {
ddl.append(" UNIQUE");
}
if (isFullTextIndex(index)) {
ddl.append(" FULLTEXT");
}
ddl.append(" INDEX ");
printIdentifier(getIndexName(index), ddl);
ddl.append(" ON ");
Expand All @@ -2349,6 +2352,10 @@ protected void writeExternalIndexCreateStmt(Table table, IIndex index, StringBui
}
}

protected boolean isFullTextIndex(IIndex index) {
return false;
}

/**
* Writes the given embedded index of the table.
*/
Expand Down
Expand Up @@ -37,6 +37,8 @@
import org.jumpmind.db.model.ColumnTypes;
import org.jumpmind.db.model.Database;
import org.jumpmind.db.model.ForeignKey;
import org.jumpmind.db.model.IIndex;
import org.jumpmind.db.model.IndexColumn;
import org.jumpmind.db.model.Table;
import org.jumpmind.db.platform.AbstractDdlBuilder;
import org.jumpmind.db.platform.DatabaseNamesConstants;
Expand Down Expand Up @@ -169,6 +171,17 @@ protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKe
}
}

protected boolean isFullTextIndex(IIndex index) {
for (int idx = 0; idx < index.getColumnCount(); idx++) {
Column column = index.getColumn(idx).getColumn();

if (column.getMappedTypeCode() == Types.LONGVARCHAR) {
return true;
}
}
return false;
}

@Override
protected void processTableStructureChanges(Database currentModel, Database desiredModel,
Table sourceTable, Table targetTable, List<TableChange> changes, StringBuilder ddl) {
Expand Down

0 comments on commit b623c37

Please sign in to comment.