Files
query-orchestration/database/migrations/00000000000005_collectors.up.sql
T
Michael McGuinness 90353d8161 Merged in feature/docclean (pull request #55)
Doc Clean Structure

* outline

* isdocclean

* placeholder for clean log

* versionplustesting

* versionplustesting

* testspassed
2025-02-07 12:12:51 +00:00

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