Skip to content

Commit

Permalink
Include index options
Browse files Browse the repository at this point in the history
  • Loading branch information
abbyssoul committed Oct 16, 2024
1 parent 0d37bf2 commit d272c09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d272c09

Please sign in to comment.