From 1ecf2e6204384adcef2071641e2a165a50d6deba Mon Sep 17 00:00:00 2001 From: zhtiyissr Date: Sun, 8 Oct 2023 23:47:02 +0800 Subject: [PATCH] fix: comment code and test again --- migrator/migrator.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migrator/migrator.go b/migrator/migrator.go index 667d496e..4902b70e 100644 --- a/migrator/migrator.go +++ b/migrator/migrator.go @@ -35,8 +35,8 @@ type Migrator struct { // Config schema config type Config struct { CreateIndexAfterCreateTable bool - CreateTableUseIfNotExists bool - DB *gorm.DB + // CreateTableUseIfNotExists bool + DB *gorm.DB gorm.Dialector } @@ -214,9 +214,9 @@ func (m Migrator) CreateTable(values ...interface{}) error { hasPrimaryKeyInDataType bool ) - if m.CreateTableUseIfNotExists { - createTableSQL = "CREATE TABLE IF NOT EXISTS ? (" - } + // if m.CreateTableUseIfNotExists { + // createTableSQL = "CREATE TABLE IF NOT EXISTS ? (" + // } for _, dbName := range stmt.Schema.DBNames { field := stmt.Schema.FieldsByDBName[dbName]