11 lines
348 B
SQL
11 lines
348 B
SQL
CREATE TABLE results (
|
|
id uuid primary key,
|
|
queryId uuid not null,
|
|
documentId uuid not null,
|
|
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)
|
|
); |