@@ -565,18 +565,17 @@ func TestMigrateAddDropColumns(t *testing.T) {
565
565
t .Fatalf ("Should fail to add column with existing name" )
566
566
}
567
567
568
- // https://github.com/oracle-samples/gorm-oracle/issues/80
569
- // if err := DB.Table("migrate_add_drop_columns").Migrator().DropColumn(&MigrateAddDropColumns{}, "NewName"); err != nil {
570
- // t.Fatalf("Failed to drop column, got %v", err)
571
- // }
568
+ if err := DB .Table ("migrate_add_drop_columns" ).Migrator ().DropColumn (& MigrateAddDropColumns {}, "NewName" ); err != nil {
569
+ t .Fatalf ("Failed to drop column, got %v" , err )
570
+ }
572
571
573
- // if DB.Table("migrate_add_drop_columns").Migrator().HasColumn(&MigrateAddDropColumns{}, "NewName") {
574
- // t.Fatalf("Found deleted column")
575
- // }
572
+ if DB .Table ("migrate_add_drop_columns" ).Migrator ().HasColumn (& MigrateAddDropColumns {}, "NewName" ) {
573
+ t .Fatalf ("Found deleted column" )
574
+ }
576
575
577
- // if err := DB.Table("migrate_add_drop_columns").Migrator().AddColumn(&MigrateAddDropColumns{}, "NewName"); err != nil {
578
- // t.Fatalf("Failed to add column, got %v", err)
579
- // }
576
+ if err := DB .Table ("migrate_add_drop_columns" ).Migrator ().AddColumn (& MigrateAddDropColumns {}, "NewName" ); err != nil {
577
+ t .Fatalf ("Failed to add column, got %v" , err )
578
+ }
580
579
581
580
if err := DB .Table ("migrate_add_drop_columns" ).Migrator ().RenameColumn (& MigrateAddDropColumns {}, "NewName" ,
582
581
"new_new_name" ); err != nil {
@@ -591,14 +590,13 @@ func TestMigrateAddDropColumns(t *testing.T) {
591
590
t .Fatalf ("Found renamed column" )
592
591
}
593
592
594
- // https://github.com/oracle-samples/gorm-oracle/issues/80
595
- // if err := DB.Table("migrate_add_drop_columns").Migrator().DropColumn(&MigrateAddDropColumns{}, "new_new_name"); err != nil {
596
- // t.Fatalf("Failed to add column, got %v", err)
597
- // }
593
+ if err := DB .Table ("migrate_add_drop_columns" ).Migrator ().DropColumn (& MigrateAddDropColumns {}, "new_new_name" ); err != nil {
594
+ t .Fatalf ("Failed to add column, got %v" , err )
595
+ }
598
596
599
- // if DB.Table("migrate_add_drop_columns").Migrator().HasColumn(&MigrateAddDropColumns{}, "new_new_name") {
600
- // t.Fatalf("Found deleted column")
601
- // }
597
+ if DB .Table ("migrate_add_drop_columns" ).Migrator ().HasColumn (& MigrateAddDropColumns {}, "new_new_name" ) {
598
+ t .Fatalf ("Found deleted column" )
599
+ }
602
600
}
603
601
604
602
func TestMigrateConstraint (t * testing.T ) {
0 commit comments