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 <appleboy.tw@gmail.com>
This commit is contained in:
parent
7a535a7899
commit
d19b4e6a94
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue