1
0
mirror of https://github.com/beego/bee.git synced 2024-11-26 01:11:30 +00:00
This commit is contained in:
Mongo 2017-10-03 18:15:34 +08:00
parent bbe142b345
commit d1f0deac1f

View File

@ -187,7 +187,7 @@ func checkForSchemaUpdateTable(db *sql.DB, driver string) {
beeLogger.Log.Fatalf("Column migration.name type mismatch: TYPE: %s, NULL: %s", typeStr, nullStr) beeLogger.Log.Fatalf("Column migration.name type mismatch: TYPE: %s, NULL: %s", typeStr, nullStr)
} }
} else if fieldStr == "created_at" { } else if fieldStr == "created_at" {
if typeStr != "timestamp" || (defaultStr != "CURRENT_TIMESTAMP" && defaultStr != "CURRENT_TIMESTAMP()") { if typeStr != "timestamp" || ((defaultStr != "CURRENT_TIMESTAMP") && (defaultStr != "CURRENT_TIMESTAMP()")) {
beeLogger.Log.Hint("Expecting TYPE: timestamp, DEFAULT: CURRENT_TIMESTAMP || CURRENT_TIMESTAMP()") beeLogger.Log.Hint("Expecting TYPE: timestamp, DEFAULT: CURRENT_TIMESTAMP || CURRENT_TIMESTAMP()")
beeLogger.Log.Fatalf("Column migration.timestamp type mismatch: TYPE: %s, DEFAULT: %s", typeStr, defaultStr) beeLogger.Log.Fatalf("Column migration.timestamp type mismatch: TYPE: %s, DEFAULT: %s", typeStr, defaultStr)
} }