From be77a7084ba1565909b5c42daec858b8db057c9f Mon Sep 17 00:00:00 2001 From: appleboy Date: Sun, 17 Mar 2024 03:53:16 +0000 Subject: [PATCH] refactor: ensure non-null values in migration table creation (#2434) - Change the migration table creation to not allow null values for the column fix https://gitea.com/xorm/xorm/issues/2433 Signed-off-by: appleboy Reviewed-on: https://gitea.com/xorm/xorm/pulls/2434 Reviewed-by: Lunny Xiao Co-authored-by: appleboy Co-committed-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)))