Files
query-orchestration/database/migrations/00000000000006_documents.up.sql
T

16 lines
459 B
SQL
Raw Normal View History

2025-01-23 14:56:20 +00:00
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)
2025-01-23 14:56:20 +00:00
);