diff --git a/migrator.go b/migrator.go index 7c093df..3452c5e 100644 --- a/migrator.go +++ b/migrator.go @@ -142,6 +142,10 @@ func (m Migrator) CreateIndex(value interface{}, name string) error { createIndexSQL += " ?" } + if idx.Option != "" { + createIndexSQL += " " + idx.Option + } + if idx.Where != "" { createIndexSQL += " WHERE " + idx.Where }