Skip to content

Commit 50307e2

Browse files
authored
Include index options (#288)
1 parent f185f22 commit 50307e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

migrator.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ func (m Migrator) CreateIndex(value interface{}, name string) error {
142142
createIndexSQL += " ?"
143143
}
144144

145+
if idx.Option != "" {
146+
createIndexSQL += " " + idx.Option
147+
}
148+
145149
if idx.Where != "" {
146150
createIndexSQL += " WHERE " + idx.Where
147151
}

0 commit comments

Comments
 (0)