From 95bf3ec3549d0be6957034262bc9c02e3af66815 Mon Sep 17 00:00:00 2001 From: Alexis Viscogliosi Date: Fri, 17 May 2024 20:37:38 +0200 Subject: [PATCH] snap: add them --- .../testdata/TestPostgres_AddColumn/with_timestamps.snap.txt | 2 ++ .../change_column_type_with_using.snap.txt | 1 + .../testdata/TestPostgres_ChangeColumn/simple_change.snap.txt | 1 + .../testdata/TestPostgres_RenameTable/rename_table.snap.txt | 4 ++++ 4 files changed, 8 insertions(+) create mode 100644 pkg/schema/pg/testdata/TestPostgres_AddColumn/with_timestamps.snap.txt create mode 100644 pkg/schema/pg/testdata/TestPostgres_ChangeColumn/change_column_type_with_using.snap.txt create mode 100644 pkg/schema/pg/testdata/TestPostgres_ChangeColumn/simple_change.snap.txt create mode 100644 pkg/schema/pg/testdata/TestPostgres_RenameTable/rename_table.snap.txt diff --git a/pkg/schema/pg/testdata/TestPostgres_AddColumn/with_timestamps.snap.txt b/pkg/schema/pg/testdata/TestPostgres_AddColumn/with_timestamps.snap.txt new file mode 100644 index 0000000..02ab579 --- /dev/null +++ b/pkg/schema/pg/testdata/TestPostgres_AddColumn/with_timestamps.snap.txt @@ -0,0 +1,2 @@ +ALTER TABLE tst_pg_add_column_12.articles ADD "created_at" TIMESTAMP(6) DEFAULT now() NOT NULL +ALTER TABLE tst_pg_add_column_12.articles ADD "updated_at" TIMESTAMP(6) DEFAULT now() NOT NULL diff --git a/pkg/schema/pg/testdata/TestPostgres_ChangeColumn/change_column_type_with_using.snap.txt b/pkg/schema/pg/testdata/TestPostgres_ChangeColumn/change_column_type_with_using.snap.txt new file mode 100644 index 0000000..82c27d4 --- /dev/null +++ b/pkg/schema/pg/testdata/TestPostgres_ChangeColumn/change_column_type_with_using.snap.txt @@ -0,0 +1 @@ +ALTER TABLE tst_pg_change_column_1.articles ALTER COLUMN name TYPE INTEGER USING length(name) diff --git a/pkg/schema/pg/testdata/TestPostgres_ChangeColumn/simple_change.snap.txt b/pkg/schema/pg/testdata/TestPostgres_ChangeColumn/simple_change.snap.txt new file mode 100644 index 0000000..51df605 --- /dev/null +++ b/pkg/schema/pg/testdata/TestPostgres_ChangeColumn/simple_change.snap.txt @@ -0,0 +1 @@ +ALTER TABLE tst_pg_change_column_0.articles ALTER COLUMN name TYPE varchar(255) diff --git a/pkg/schema/pg/testdata/TestPostgres_RenameTable/rename_table.snap.txt b/pkg/schema/pg/testdata/TestPostgres_RenameTable/rename_table.snap.txt new file mode 100644 index 0000000..6fb3ee2 --- /dev/null +++ b/pkg/schema/pg/testdata/TestPostgres_RenameTable/rename_table.snap.txt @@ -0,0 +1,4 @@ +CREATE TABLE tst_pg_rename_table_0.articles ( +"id" SERIAL NOT NULL PRIMARY KEY +) +ALTER TABLE tst_pg_rename_table_0.articles RENAME TO posts