2025-01-23 14:56:20 +00:00
|
|
|
CREATE TABLE documents (
|
|
|
|
|
id uuid primary key DEFAULT gen_random_uuid(),
|
|
|
|
|
jobId uuid not null,
|
2025-01-24 16:12:25 +00:00
|
|
|
hash text not null,
|
2025-02-05 17:44:01 +00:00
|
|
|
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,
|
2025-01-24 16:12:25 +00:00
|
|
|
location text not null,
|
2025-02-05 17:44:01 +00:00
|
|
|
createdAt timestamp default now(),
|
|
|
|
|
foreign key (documentId) references documents(id)
|
2025-01-23 14:56:20 +00:00
|
|
|
);
|