Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect liquibase references to instance_id #1286

Merged
merged 1 commit into from Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,13 +14,13 @@
if (new.uom = 'CORES') then
update hosts
set cores=new.value
where instance_id = new.instance_id::text
where id = new.instance_id
and cores is null
or cores != new.value;
elsif (new.uom = 'SOCKETS') then
update hosts
set sockets=new.value
where instance_id = new.instance_id::text
where id = new.instance_id
and sockets is null
or sockets != new.value;
end if;
Expand Down
Expand Up @@ -10,7 +10,7 @@
<comment>Copy data from hosts.cores to instance_measurements.</comment>
<sql>
insert into instance_measurements(instance_id, uom, value)
select instance_id::uuid, 'CORES', cores
select id, 'CORES', cores
from hosts
where cores is not null on conflict(instance_id, uom) do
update set value =excluded.value;
Expand All @@ -20,7 +20,7 @@
<comment>Copy data from hosts.sockets to instance_measurements.</comment>
<sql>
insert into instance_measurements(instance_id, uom, value)
select instance_id::uuid, 'SOCKETS', sockets
select id, 'SOCKETS', sockets
from hosts
where sockets is not null
on conflict(instance_id, uom) do update set value=excluded.value;
Expand Down