From d19b4e6a9456b1748e99f0690a3c388a4c1f96e9 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sun, 17 Mar 2024 10:39:23 +0800 Subject: [PATCH] refactor: ensure non-null values in migration table creation - Change the migration table creation to not allow null values for the column Signed-off-by: appleboy --- migrate/migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate/migrate.go b/migrate/migrate.go index cd553ecb..2e5a6e3a 100644 --- a/migrate/migrate.go +++ b/migrate/migrate.go @@ -199,7 +199,7 @@ func (m *Migrate) createMigrationTableIfNotExists() error { idCol := schemas.NewColumn(m.options.IDColumnName, "", schemas.SQLType{ Name: "VARCHAR", - }, 255, 0, true) + }, 255, 0, false) idCol.IsPrimaryKey = true table := schemas.NewTable(m.options.TableName, reflect.TypeOf(new(schemas.Table)))