90353d8161
Doc Clean Structure * outline * isdocclean * placeholder for clean log * versionplustesting * versionplustesting * testspassed
30 lines
942 B
SQL
30 lines
942 B
SQL
CREATE TABLE collectors (
|
|
id uuid primary key DEFAULT uuid_generate_v7(),
|
|
jobId uuid not null,
|
|
latestVersion int not null default 1,
|
|
activeVersion int not null default 1,
|
|
foreign key (jobId) references jobs(id),
|
|
unique (jobId)
|
|
);
|
|
|
|
CREATE TABLE collectorCodeVersions (
|
|
id uuid primary key DEFAULT uuid_generate_v7(),
|
|
collectorId uuid not null,
|
|
minCleanVersion int not null,
|
|
minTextVersion int not null,
|
|
addedVersion int not null,
|
|
removedVersion int,
|
|
foreign key (collectorId) references collectors(id)
|
|
);
|
|
|
|
CREATE TABLE collectorQueries (
|
|
id uuid primary key DEFAULT uuid_generate_v7(),
|
|
collectorId uuid not null,
|
|
name varchar(255) not null,
|
|
queryId uuid not null,
|
|
addedVersion int not null,
|
|
removedVersion int,
|
|
foreign key (queryId) references queries(id),
|
|
foreign key (collectorId) references collectors(id),
|
|
unique (collectorId, name, removedVersion)
|
|
); |