chore: add organization_id column to provisioner daemons (#12356)
* chore: add organization_id column to provisioner daemons * Update upsert to include organization id on set
This commit is contained in:
1 parent
46a2ff1061
commit
b5f866c1cb
10 files changed
+91
-44
No files matched your search
Generated
+5
-1
@@ -614,7 +614,8 @@ CREATE TABLE provisioner_daemons (
|
||||
tags jsonb DEFAULT '{}'::jsonb NOT NULL,
|
||||
last_seen_at timestamp with time zone,
|
||||
version text DEFAULT ''::text NOT NULL,
|
||||
api_version text DEFAULT '1.0'::text NOT NULL
|
||||
api_version text DEFAULT '1.0'::text NOT NULL,
|
||||
organization_id uuid NOT NULL
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN provisioner_daemons.api_version IS 'The API version of the provisioner daemon';
|
||||
@@ -1688,6 +1689,9 @@ ALTER TABLE ONLY organization_members
|
||||
ALTER TABLE ONLY parameter_schemas
|
||||
ADD CONSTRAINT parameter_schemas_job_id_fkey FOREIGN KEY (job_id) REFERENCES provisioner_jobs(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY provisioner_daemons
|
||||
ADD CONSTRAINT provisioner_daemons_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY provisioner_job_logs
|
||||
ADD CONSTRAINT provisioner_job_logs_job_id_fkey FOREIGN KEY (job_id) REFERENCES provisioner_jobs(id) ON DELETE CASCADE;
|
||||
|
||||
|
||||
Reference in new issue
Block a user