Files
query-orchestration/database/migrations/00000000000006_documents.up.sql
T
Michael McGuinness 5c253b3592 Merged in feature/docinit (pull request #48)
Feature/docinit

* createunittests

* cleanup

* skip

* cleanup
2025-02-05 17:44:01 +00:00

16 lines
459 B
SQL

CREATE TABLE documents (
id uuid primary key DEFAULT gen_random_uuid(),
jobId uuid not null,
hash text not null,
foreign key (jobId) references jobs(id),
unique(jobId, hash)
);
CREATE TABLE documentEntries (
id uuid primary key DEFAULT gen_random_uuid(),
documentId uuid not null,
bucket text not null,
location text not null,
createdAt timestamp default now(),
foreign key (documentId) references documents(id)
);