5c253b3592
Feature/docinit * createunittests * cleanup * skip * cleanup
16 lines
459 B
SQL
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)
|
|
); |