Tie together the database-driven session handling with the worker and add relevant CLI comands (#370)
This commit is contained in:
1 parent
fd8ceb6cc4
commit
07a7e9750a
57 files changed
+2548
-826
No files matched your search
@@ -151,14 +151,15 @@ begin;
|
||||
on update cascade,
|
||||
version wt_version,
|
||||
create_time wt_timestamp,
|
||||
update_time wt_timestamp
|
||||
update_time wt_timestamp,
|
||||
endpoint text -- not part of the warehouse, used to send info to the worker
|
||||
);
|
||||
|
||||
create trigger
|
||||
immutable_columns
|
||||
before
|
||||
update on session
|
||||
for each row execute procedure immutable_columns('public_id', 'certificate', 'expiration_time', 'connection_limit', 'create_time');
|
||||
for each row execute procedure immutable_columns('public_id', 'certificate', 'expiration_time', 'connection_limit', 'create_time', 'endpoint');
|
||||
|
||||
create trigger
|
||||
update_version_column
|
||||
@@ -194,6 +195,8 @@ begin;
|
||||
raise exception 'auth_token_id is null';
|
||||
when new.scope_id is null then
|
||||
raise exception 'scope_id is null';
|
||||
when new.endpoint is null then
|
||||
raise exception 'endpoint is null';
|
||||
else
|
||||
end case;
|
||||
return new;
|
||||
|
||||
Reference in new issue
Block a user