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