fix: comment code and test again
This commit is contained in:
parent
d34abe9128
commit
1ecf2e6204
@ -35,8 +35,8 @@ type Migrator struct {
|
|||||||
// Config schema config
|
// Config schema config
|
||||||
type Config struct {
|
type Config struct {
|
||||||
CreateIndexAfterCreateTable bool
|
CreateIndexAfterCreateTable bool
|
||||||
CreateTableUseIfNotExists bool
|
// CreateTableUseIfNotExists bool
|
||||||
DB *gorm.DB
|
DB *gorm.DB
|
||||||
gorm.Dialector
|
gorm.Dialector
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,9 +214,9 @@ func (m Migrator) CreateTable(values ...interface{}) error {
|
|||||||
hasPrimaryKeyInDataType bool
|
hasPrimaryKeyInDataType bool
|
||||||
)
|
)
|
||||||
|
|
||||||
if m.CreateTableUseIfNotExists {
|
// if m.CreateTableUseIfNotExists {
|
||||||
createTableSQL = "CREATE TABLE IF NOT EXISTS ? ("
|
// createTableSQL = "CREATE TABLE IF NOT EXISTS ? ("
|
||||||
}
|
// }
|
||||||
|
|
||||||
for _, dbName := range stmt.Schema.DBNames {
|
for _, dbName := range stmt.Schema.DBNames {
|
||||||
field := stmt.Schema.FieldsByDBName[dbName]
|
field := stmt.Schema.FieldsByDBName[dbName]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user