From d4695e8645a3c3b49213dc75f298b500f3caefd0 Mon Sep 17 00:00:00 2001 From: Charith Ellawala Date: Fri, 20 Jan 2023 08:15:03 +0000 Subject: [PATCH] Fix: getMigrationDbMap method incorrectly uses the global migration set The `getMigrationDbMap` method on `MigrationSet` uses the global `migSet` to check whether table creation is disabled. It should be checking the instance variable instead. Signed-off-by: Charith Ellawala --- migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate.go b/migrate.go index a6ff7b25..65082cc8 100644 --- a/migrate.go +++ b/migrate.go @@ -818,7 +818,7 @@ Check https://github.com/go-sql-driver/mysql#parsetime for more info.`) table.ColMap("Id").SetMaxSize(4000) } - if migSet.DisableCreateTable { + if ms.DisableCreateTable { return dbMap, nil }