Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorder test cases
Browse files Browse the repository at this point in the history
andrew-farries committed Dec 19, 2024
1 parent 58cd329 commit 001c7c5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/sql2pgroll/create_table_test.go
Original file line number Diff line number Diff line change
@@ -32,14 +32,6 @@ func TestConvertCreateTableStatements(t *testing.T) {
sql: "CREATE TABLE foo(a int NOT NULL)",
expectedOp: expect.CreateTableOp2,
},
{
sql: "CREATE TABLE foo(a varchar(255))",
expectedOp: expect.CreateTableOp3,
},
{
sql: "CREATE TABLE foo(a numeric(10, 2))",
expectedOp: expect.CreateTableOp4,
},
{
sql: "CREATE TABLE foo(a int UNIQUE)",
expectedOp: expect.CreateTableOp5,
@@ -48,6 +40,18 @@ func TestConvertCreateTableStatements(t *testing.T) {
sql: "CREATE TABLE foo(a int PRIMARY KEY)",
expectedOp: expect.CreateTableOp6,
},
{
sql: "CREATE TABLE foo(a int CHECK (a > 0))",
expectedOp: expect.CreateTableOp10,
},
{
sql: "CREATE TABLE foo(a varchar(255))",
expectedOp: expect.CreateTableOp3,
},
{
sql: "CREATE TABLE foo(a numeric(10, 2))",
expectedOp: expect.CreateTableOp4,
},
{
sql: "CREATE TABLE foo(a text[])",
expectedOp: expect.CreateTableOp7,
@@ -60,10 +64,6 @@ func TestConvertCreateTableStatements(t *testing.T) {
sql: "CREATE TABLE foo(a text[5][3])",
expectedOp: expect.CreateTableOp9,
},
{
sql: "CREATE TABLE foo(a int CHECK (a > 0))",
expectedOp: expect.CreateTableOp10,
},
}

for _, tc := range tests {

0 comments on commit 001c7c5

Please sign in to comment.