diff --git a/tests/mysql_data.sql b/tests/mysql_data.sql index 4033207..8258706 100644 --- a/tests/mysql_data.sql +++ b/tests/mysql_data.sql @@ -25,3 +25,16 @@ INSERT INTO `table_truncate2` (`id`, `delete_me`) VALUES (1, 1), (2, 1), (3, 0); + +DROP TABLE IF EXISTS `table_update`; +CREATE TABLE `table_update` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `col_string` varchar(255) NULL, + `col_bool` int NULL, + `col_int` int NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +INSERT INTO `table_update` (`id`, `col_string`, `col_bool`, `col_int`) VALUES +(1, 'foo', 1, 1), +(2, 'bar', 0, 2), +(3, NULL, NULL, NULL); diff --git a/tests/postgres_data.sql b/tests/postgres_data.sql index ff7249c..de3754b 100644 --- a/tests/postgres_data.sql +++ b/tests/postgres_data.sql @@ -23,3 +23,20 @@ INSERT INTO "table_truncate2" ("id", "delete_me") VALUES (1, 't'), (2, 't'), (3, 'f'); + +DROP TABLE IF EXISTS "table_update"; +DROP SEQUENCE IF EXISTS table_update_id_seq; +CREATE SEQUENCE table_update_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1; + +CREATE TABLE "public"."table_update" ( + "id" integer DEFAULT nextval('table_update_id_seq') NOT NULL, + "col_string" character varying, + "col_bool" boolean, + "col_int" integer, + CONSTRAINT "table_update_pkey" PRIMARY KEY ("id") +) WITH (oids = false); + +INSERT INTO "table_update" ("id", "col_string", "col_bool", "col_int") VALUES +(1, 'foo', 't', 1), +(2, 'bar', 'f', 2), +(3, NULL, NULL, NULL); diff --git a/tests/schema.yml b/tests/schema.yml index 80bd94b..b8b7791 100644 --- a/tests/schema.yml +++ b/tests/schema.yml @@ -1,5 +1,10 @@ rules: actions: + - table: table_update + columns: + col_string: address_city + col_bool: boolean_bool + col_int: '{{ "10" }}' - table: table_truncate1 truncate: true - table: table_truncate2