Skip to content

Commit 1c346b0

Browse files
committed
Fix Mysql index creation problem
1 parent a24a5ec commit 1c346b0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Orm/Xtensive.Orm.MySql/Sql.Drivers.MySql/v5_0/Translator.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,14 @@ public override void Translate(SqlCompilerContext context, SqlCreateIndex node,
253253
switch (section) {
254254
case CreateIndexSection.Entry:
255255
var output = context.Output;
256-
_ = output.Append("CREATE ");
257256
if (index.IsUnique) {
258-
_ = output.Append("UNIQUE INDEX ");
257+
_ = output.Append("CREATE UNIQUE INDEX ");
259258
}
260259
else if (index.IsFullText) {
261-
_ = output.Append("FULLTEXT INDEX");
260+
_ = output.Append("CREATE FULLTEXT INDEX");
261+
}
262+
else {
263+
_ = output.Append("CREATE INDEX ");
262264
}
263265
TranslateIdentifier(output, index.Name);
264266
_ = output.Append(" USING BTREE ON ");

0 commit comments

Comments
 (0)