Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Rico <[email protected]>
  • Loading branch information
SferaDev committed Nov 27, 2023
1 parent 92bcf2c commit 0220573
Show file tree
Hide file tree
Showing 16 changed files with 138 additions and 138 deletions.
54 changes: 27 additions & 27 deletions pkg/migrations/op_add_column_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ func TestAddColumn(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -121,9 +121,9 @@ func TestAddForeignKeyColumn(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand All @@ -136,9 +136,9 @@ func TestAddForeignKeyColumn(t *testing.T) {
Name: "orders",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "quantity",
Expand Down Expand Up @@ -223,9 +223,9 @@ func TestAddForeignKeyColumn(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand All @@ -238,9 +238,9 @@ func TestAddForeignKeyColumn(t *testing.T) {
Name: "orders",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "quantity",
Expand Down Expand Up @@ -332,9 +332,9 @@ func TestAddColumnWithUpSql(t *testing.T) {
Name: "products",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -419,9 +419,9 @@ func TestAddNotNullColumnWithNoDefault(t *testing.T) {
Name: "products",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -485,9 +485,9 @@ func TestAddColumnValidation(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -604,9 +604,9 @@ func TestAddColumnWithCheckConstraint(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down
12 changes: 6 additions & 6 deletions pkg/migrations/op_alter_column_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ func TestAlterColumnValidation(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand All @@ -32,9 +32,9 @@ func TestAlterColumnValidation(t *testing.T) {
Name: "posts",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "title",
Expand Down
12 changes: 6 additions & 6 deletions pkg/migrations/op_change_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ func TestChangeColumnType(t *testing.T) {
Name: "reviews",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "username",
Expand Down Expand Up @@ -157,9 +157,9 @@ func TestChangeColumnTypeValidation(t *testing.T) {
Name: "reviews",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "username",
Expand Down
12 changes: 6 additions & 6 deletions pkg/migrations/op_create_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func TestCreateIndex(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -73,9 +73,9 @@ func TestCreateIndexOnMultipleColumns(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down
36 changes: 18 additions & 18 deletions pkg/migrations/op_create_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func TestCreateTable(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -84,9 +84,9 @@ func TestCreateTable(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand All @@ -104,9 +104,9 @@ func TestCreateTable(t *testing.T) {
Name: "orders",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "user_id",
Expand Down Expand Up @@ -181,9 +181,9 @@ func TestCreateTable(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -246,9 +246,9 @@ func TestCreateTableValidation(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand All @@ -266,9 +266,9 @@ func TestCreateTableValidation(t *testing.T) {
Name: "orders",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "user_id",
Expand Down
6 changes: 3 additions & 3 deletions pkg/migrations/op_drop_column_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ func TestDropColumnWithDownSQL(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down
36 changes: 18 additions & 18 deletions pkg/migrations/op_drop_constraint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ func TestDropConstraint(t *testing.T) {
Name: "posts",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "title",
Expand Down Expand Up @@ -153,9 +153,9 @@ func TestDropConstraint(t *testing.T) {
Name: "posts",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "title",
Expand Down Expand Up @@ -219,9 +219,9 @@ func TestDropConstraint(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand All @@ -233,9 +233,9 @@ func TestDropConstraint(t *testing.T) {
Name: "posts",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "title",
Expand Down Expand Up @@ -384,9 +384,9 @@ func TestDropConstraint(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down Expand Up @@ -466,9 +466,9 @@ func TestDropConstraintValidation(t *testing.T) {
Name: "posts",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "title",
Expand Down
6 changes: 3 additions & 3 deletions pkg/migrations/op_drop_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func TestDropIndex(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down
6 changes: 3 additions & 3 deletions pkg/migrations/op_drop_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func TestDropTable(t *testing.T) {
Name: "users",
Columns: []migrations.Column{
{
Name: "id",
Type: "serial",
PrimaryKey: true,
Name: "id",
Type: "serial",
Pk: true,
},
{
Name: "name",
Expand Down
Loading

0 comments on commit 0220573

Please sign in to comment.