Skip to content

TestMigrateColumns Test Failure #37

@jawad-arb123

Description

@jawad-arb123

While running the TestMigrateColumns Test , we get this issue :

Error Message

2025/08/22 12:09:30 /Users/jawadarbahi/Documents/new_clean_action/gorm-oracle/oracle/migrator.go:377
[179.830ms] [rows:-] SELECT * FROM "column_structs" WHERE ROWNUM = 1
migrate_test.go:490: column id primary key should be correct, name: id, column: migrator.ColumnType{SQLColumnType:(*sql.ColumnType)(0x140003ee460), NameValue:sql.NullString{String:"", Valid:false}, DataTypeValue:sql.NullString{String:"", Valid:false}, ColumnTypeValue:sql.NullString{String:"", Valid:false}, PrimaryKeyValue:sql.NullBool{Bool:false, Valid:false}, UniqueValue:sql.NullBool{Bool:false, Valid:false}, AutoIncrementValue:sql.NullBool{Bool:false, Valid:false}, LengthValue:sql.NullInt64{Int64:0, Valid:false}, DecimalSizeValue:sql.NullInt64{Int64:0, Valid:false}, ScaleValue:sql.NullInt64{Int64:0, Valid:false}, NullableValue:sql.NullBool{Bool:false, Valid:false}, ScanTypeValue:reflect.Type(nil), CommentValue:sql.NullString{String:"", Valid:false}, DefaultValueValue:sql.NullString{String:"", Valid:false}}
--- FAIL: TestMigrateColumns (2.88s)

FAIL

Bug Description

The TestMigrateColumns test fails because the ColumnTypes() method in the Oracle GORM migrator returns ColumnType objects with all metadata fields set to invalid/empty values. This prevents proper validation of column properties such as primary keys, constraints, default values, and comments.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions