fix migrator

This commit is contained in:
Daniel Tan 2020-08-03 17:20:19 +08:00 committed by GitHub
parent f83b00d20d
commit f86b5416c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,7 +134,7 @@ func (m Migrator) CreateTable(values ...interface{}) error {
if err := m.RunWithValue(value, func(stmt *gorm.Statement) (errr error) { if err := m.RunWithValue(value, func(stmt *gorm.Statement) (errr error) {
var ( var (
createTableSQL = "CREATE TABLE ? (" createTableSQL = "CREATE TABLE ? ("
values = []interface{}{clause.Table{Name: stmt.Table}} values = []interface{}{clause.Table{Name: stmt.Schema.Table}}
hasPrimaryKeyInDataType bool hasPrimaryKeyInDataType bool
) )