tests: add mysql/postgres datas

This commit is contained in:
Simon Vieille 2024-04-01 12:29:51 +02:00
parent 77a87114c8
commit 2ba8561574
Signed by: deblan
GPG key ID: 579388D585F70417
3 changed files with 35 additions and 0 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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