Skip to content

Commit

Permalink
fix(PostgresGrammar): Update enum tests for Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed May 17, 2020
1 parent 2d65e08 commit c50b00b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/specs/Schema/PostgresSchemaBuilderSpec.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ component extends="tests.resources.AbstractSchemaBuilderSpec" {

function enum() {
return [
"CREATE TYPE ""tshirt_size"" AS ENUM (""S"", ""M"", ""L"", ""XL"", ""XXL"")",
"CREATE TYPE ""tshirt_size"" AS ENUM ('S', 'M', 'L', 'XL', 'XXL')",
"CREATE TABLE ""employees"" (""tshirt_size"" tshirt_size NOT NULL)"
];
}
Expand Down Expand Up @@ -484,22 +484,22 @@ component extends="tests.resources.AbstractSchemaBuilderSpec" {

function addColumn() {
return [
"CREATE TYPE ""tshirt_size"" AS ENUM (""S"", ""M"", ""L"", ""XL"", ""XXL"")",
"CREATE TYPE ""tshirt_size"" AS ENUM ('S', 'M', 'L', 'XL', 'XXL')",
"ALTER TABLE ""users"" ADD COLUMN ""tshirt_size"" tshirt_size NOT NULL"
];
}

function addMultiple() {
return [
"CREATE TYPE ""tshirt_size"" AS ENUM (""S"", ""M"", ""L"", ""XL"", ""XXL"")",
"CREATE TYPE ""tshirt_size"" AS ENUM ('S', 'M', 'L', 'XL', 'XXL')",
"ALTER TABLE ""users"" ADD COLUMN ""tshirt_size"" tshirt_size NOT NULL",
"ALTER TABLE ""users"" ADD COLUMN ""is_active"" BOOLEAN NOT NULL"
];
}

function complicatedModify() {
return [
"CREATE TYPE ""tshirt_size"" AS ENUM (""S"", ""M"", ""L"", ""XL"", ""XXL"")",
"CREATE TYPE ""tshirt_size"" AS ENUM ('S', 'M', 'L', 'XL', 'XXL')",
"ALTER TABLE ""users"" DROP COLUMN ""is_active"" CASCADE",
"ALTER TABLE ""users"" ADD COLUMN ""tshirt_size"" tshirt_size NOT NULL",
"ALTER TABLE ""users"" RENAME COLUMN ""name"" TO ""username""",
Expand Down

0 comments on commit c50b00b

Please sign in to comment.