@@ -565,18 +565,17 @@ func TestMigrateAddDropColumns(t *testing.T) {
565565 t .Fatalf ("Should fail to add column with existing name" )
566566 }
567567
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+ }
572571
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+ }
576575
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+ }
580579
581580 if err := DB .Table ("migrate_add_drop_columns" ).Migrator ().RenameColumn (& MigrateAddDropColumns {}, "NewName" ,
582581 "new_new_name" ); err != nil {
@@ -591,14 +590,13 @@ func TestMigrateAddDropColumns(t *testing.T) {
591590 t .Fatalf ("Found renamed column" )
592591 }
593592
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+ }
598596
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+ }
602600}
603601
604602func TestMigrateConstraint (t * testing.T ) {
0 commit comments