ALTER TABLE jobs
    DROP CONSTRAINT jobs_tenant_id_fkey;

ALTER TABLE jobs
    ALTER COLUMN tenant_id SET NOT NULL;

ALTER TABLE jobs
    ADD CONSTRAINT jobs_tenant_id_fkey
    FOREIGN KEY (tenant_id)
    REFERENCES tenants(id);

ALTER TABLE jobs
    DROP COLUMN result;
