jsonextractionv0
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DROP TABLE queryConfigs;
|
||||
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE queryConfigs (
|
||||
id uuid primary key,
|
||||
queryId uuid not null,
|
||||
config jsonb not null,
|
||||
addedVersion int not null,
|
||||
removedVersion int,
|
||||
foreign key (queryId) references queries(id),
|
||||
unique (queryId, removedVersion)
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
-- name: GetQueryConfig :one
|
||||
SELECT id, config FROM queryConfigs where queryId = $1 and addedVersion >= $2 and COALESCE(removedVersion, $2 - 1) < $2;
|
||||
Reference in New Issue
Block a user