diff --git a/internal/integration/testdata/postgres/column-generated.txt b/internal/integration/testdata/postgres/column-generated.txt deleted file mode 100644 index c49eadcd4b3..00000000000 --- a/internal/integration/testdata/postgres/column-generated.txt +++ /dev/null @@ -1,111 +0,0 @@ -# Skip PostgreSQL 10, 11 as they do not support generated columns. Also, skip PostgreSQL 17, because it has a separate test file. -! only postgres10|postgres11|postgres-ext-postgis - -apply 1.hcl -cmpshow users 1.sql - -! apply 2.fail1.hcl 'changing column "a" to generated column is not supported (drop and add is required)' -! apply 2.fail2.hcl 'changing the generation expression for a column "b" is not supported' - -# Skip PostgreSQL 12 as it does not support 'DROP EXPRESSION'. -! only postgres12 -apply 3.hcl -cmpshow users 3.sql - --- 1.hcl -- -schema "$db" {} - -table "users" { - schema = schema.$db - column "a" { - type = int - } - column "b" { - type = int - as = "1" - } - column "c" { - type = int - as { - expr = "2" - type = STORED - } - } -} - --- 1.sql -- - Table "script_column_generated.users" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+-------------------------------- - a | integer | | not null | - b | integer | | not null | generated always as (1) stored - c | integer | | not null | generated always as (2) stored - --- 2.fail1.hcl -- -schema "$db" {} - -table "users" { - schema = schema.$db - column "a" { - type = int - as = "0" - } - column "b" { - type = int - as = "1" - } - column "c" { - type = int - as { - expr = "2" - type = STORED - } - } -} - --- 2.fail2.hcl -- -schema "$db" {} - -table "users" { - schema = schema.$db - column "a" { - type = int - } - column "b" { - type = int - as = "2" - } - column "c" { - type = int - as { - expr = "3" - type = STORED - } - } -} - - --- 3.hcl -- -schema "$db" {} - -table "users" { - schema = schema.$db - column "a" { - type = int - } - column "b" { - type = int - } - column "c" { - type = int - } -} - --- 3.sql -- - Table "script_column_generated.users" - Column | Type | Collation | Nullable | Default ---------+---------+-----------+----------+--------- - a | integer | | not null | - b | integer | | not null | - c | integer | | not null | -