Skip to content

Commit

Permalink
Provide scripts to support polyflow 4.2.0 (correlation tables, ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-wunderlich committed Jul 1, 2024
1 parent 749b045 commit c76960c
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
create table PLF_DATA_ENTRY_CORRELATIONS
(
OWNING_ENTRY_TYPE varchar(255) not null,
OWNING_ENTRY_ID varchar(64) not null,
ENTRY_TYPE varchar(255) not null,
ENTRY_ID varchar(64) not null,
primary key (OWNING_ENTRY_TYPE, OWNING_ENTRY_ID, ENTRY_TYPE, ENTRY_ID)
);

create view PLF_VIEW_DATA_ENTRY_PAYLOAD as
(
select *
from PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES
union
(select ec.OWNING_ENTRY_ID as ENTRY_ID,
ec.OWNING_ENTRY_TYPE as ENTRY_TYPE,
ep.path as PATH,
ep.value as VALUE
from PLF_DATA_ENTRY_CORRELATIONS ec
join PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES ep
on
ec.ENTRY_ID = ep.ENTRY_ID and ec.ENTRY_TYPE = ep.ENTRY_TYPE)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
create table PLF_DATA_ENTRY_CORRELATIONS
(
OWNING_ENTRY_TYPE varchar(255) not null,
OWNING_ENTRY_ID varchar(64) not null,
ENTRY_TYPE varchar(255) not null,
ENTRY_ID varchar(64) not null,
primary key (OWNING_ENTRY_TYPE, OWNING_ENTRY_ID, ENTRY_TYPE, ENTRY_ID)
);

create view PLF_VIEW_DATA_ENTRY_PAYLOAD as
(
select *
from PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES
union
(select ec.OWNING_ENTRY_ID as ENTRY_ID,
ec.OWNING_ENTRY_TYPE as ENTRY_TYPE,
ep.path as PATH,
ep.value as VALUE
from PLF_DATA_ENTRY_CORRELATIONS ec
join PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES ep
on
ec.ENTRY_ID = ep.ENTRY_ID and ec.ENTRY_TYPE = ep.ENTRY_TYPE)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
create table PLF_DATA_ENTRY_CORRELATIONS
(
OWNING_ENTRY_TYPE varchar(255) not null,
OWNING_ENTRY_ID varchar(64) not null,
ENTRY_TYPE varchar(255) not null,
ENTRY_ID varchar(64) not null,
primary key (OWNING_ENTRY_TYPE, OWNING_ENTRY_ID, ENTRY_TYPE, ENTRY_ID)
);

create view PLF_VIEW_DATA_ENTRY_PAYLOAD as
(
select *
from PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES
union
(select ec.OWNING_ENTRY_ID as ENTRY_ID,
ec.OWNING_ENTRY_TYPE as ENTRY_TYPE,
ep.path as PATH,
ep.value as VALUE
from PLF_DATA_ENTRY_CORRELATIONS ec
join PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES ep
on
ec.ENTRY_ID = ep.ENTRY_ID and ec.ENTRY_TYPE = ep.ENTRY_TYPE)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
create table PLF_DATA_ENTRY_CORRELATIONS
(
OWNING_ENTRY_TYPE varchar(255) not null,
OWNING_ENTRY_ID varchar(64) not null,
ENTRY_TYPE varchar(255) not null,
ENTRY_ID varchar(64) not null,
primary key (OWNING_ENTRY_TYPE, OWNING_ENTRY_ID, ENTRY_TYPE, ENTRY_ID)
);

create view PLF_VIEW_DATA_ENTRY_PAYLOAD as
(
select *
from PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES
union
(select ec.OWNING_ENTRY_ID as ENTRY_ID,
ec.OWNING_ENTRY_TYPE as ENTRY_TYPE,
ep.path as PATH,
ep.value as VALUE
from PLF_DATA_ENTRY_CORRELATIONS ec
join PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES ep
on
ec.ENTRY_ID = ep.ENTRY_ID and ec.ENTRY_TYPE = ep.ENTRY_TYPE)
);

0 comments on commit c76960c

Please sign in to comment.