forked from deblan/database-anonymizer
tests: add mysql/postgres datas
This commit is contained in:
parent
77a87114c8
commit
2ba8561574
|
@ -25,3 +25,16 @@ INSERT INTO `table_truncate2` (`id`, `delete_me`) VALUES
|
||||||
(1, 1),
|
(1, 1),
|
||||||
(2, 1),
|
(2, 1),
|
||||||
(3, 0);
|
(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);
|
||||||
|
|
|
@ -23,3 +23,20 @@ INSERT INTO "table_truncate2" ("id", "delete_me") VALUES
|
||||||
(1, 't'),
|
(1, 't'),
|
||||||
(2, 't'),
|
(2, 't'),
|
||||||
(3, 'f');
|
(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);
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
rules:
|
rules:
|
||||||
actions:
|
actions:
|
||||||
|
- table: table_update
|
||||||
|
columns:
|
||||||
|
col_string: address_city
|
||||||
|
col_bool: boolean_bool
|
||||||
|
col_int: '{{ "10" }}'
|
||||||
- table: table_truncate1
|
- table: table_truncate1
|
||||||
truncate: true
|
truncate: true
|
||||||
- table: table_truncate2
|
- table: table_truncate2
|
||||||
|
|
Loading…
Reference in a new issue