Reference scripts

This commit is contained in:
Roland Praml
2022-03-21 15:02:06 +01:00
parent 2a924d8d32
commit 0d765d6583
6 changed files with 18 additions and 18 deletions
@@ -285,15 +285,15 @@ end$$
unlock tables;
create table table_history(
"index" varchar(255),
"from" varchar(255),
"to" varchar(255),
"varchar" varchar(255),
"foreign" varchar(255),
`index` varchar(255),
`from` varchar(255),
`to` varchar(255),
`varchar` varchar(255),
`foreign` varchar(255),
sys_period_start datetime(6),
sys_period_end datetime(6)
);
create view table_with_history as select * from "table" union all select * from table_history;
create view table_with_history as select * from `table` union all select * from table_history;
lock tables "table" write;
delimiter $$
create trigger table_history_upd before update on "table" for each row begin
@@ -182,7 +182,7 @@ create trigger migtest_e_history6_history_del before delete on migtest_e_history
insert into migtest_e_history6_history (sys_period_start,sys_period_end,id, test_number1, test_number2) values (OLD.sys_period_start, now(6),OLD.id, OLD.test_number1, OLD.test_number2);
end$$
unlock tables;
create view table_with_history as select * from "table" union all select * from table_history;
create view table_with_history as select * from `table` union all select * from table_history;
lock tables "table" write;
delimiter $$
create trigger table_history_upd before update on "table" for each row begin
@@ -1,6 +1,6 @@
1835064798, I__create_procs.sql
-2109016895, 1.0__initial.sql
-2062071756, 1.1.sql
1464726622, 1.0__initial.sql
1321178229, 1.1.sql
-1332434945, 1.2__dropsFor_1.1.sql
-105506677, 1.3.sql
379252952, 1.4__dropsFor_1.3.sql
@@ -285,15 +285,15 @@ end$$
unlock tables;
create table table_history(
"index" varchar(255),
"from" varchar(255),
"to" varchar(255),
"varchar" varchar(255),
"foreign" varchar(255),
`index` varchar(255),
`from` varchar(255),
`to` varchar(255),
`varchar` varchar(255),
`foreign` varchar(255),
sys_period_start datetime(6),
sys_period_end datetime(6)
);
create view table_with_history as select * from "table" union all select * from table_history;
create view table_with_history as select * from `table` union all select * from table_history;
lock tables "table" write;
delimiter $$
create trigger table_history_upd before update on "table" for each row begin
@@ -182,7 +182,7 @@ create trigger migtest_e_history6_history_del before delete on migtest_e_history
insert into migtest_e_history6_history (sys_period_start,sys_period_end,id, test_number1, test_number2) values (OLD.sys_period_start, now(6),OLD.id, OLD.test_number1, OLD.test_number2);
end$$
unlock tables;
create view table_with_history as select * from "table" union all select * from table_history;
create view table_with_history as select * from `table` union all select * from table_history;
lock tables "table" write;
delimiter $$
create trigger table_history_upd before update on "table" for each row begin
@@ -1,6 +1,6 @@
1835064798, I__create_procs.sql
-73920359, 1.0__initial.sql
-2062071756, 1.1.sql
782176262, 1.0__initial.sql
1321178229, 1.1.sql
-1332434945, 1.2__dropsFor_1.1.sql
-105506677, 1.3.sql
379252952, 1.4__dropsFor_1.3.sql