Files
query-orchestration/database/migrations/20241219130217_create_result_table.up.sql
T

11 lines
374 B
SQL
Raw Normal View History

CREATE TABLE results (
2025-01-03 13:47:19 +00:00
id uuid primary key DEFAULT gen_random_uuid(),
queryId uuid not null,
documentId uuid not null,
2024-12-19 19:49:40 +00:00
value TEXT not null,
cleanVersion int not null,
textVersion int not null,
queryVersion int not null,
foreign key (queryId) references queries(id),
unique (queryId, documentId, cleanVersion, textVersion, queryVersion)
);