Fix dev_nonces migration.

This commit is contained in:
Orne Brocaar 2024-11-13 11:42:08 +00:00
parent 41b3c6a4e4
commit 532392abe1

View File

@ -2,6 +2,6 @@ alter table device_keys
alter column dev_nonces type jsonb using jsonb_build_object('0000000000000000', dev_nonces);
update device_keys
set dev_nonces = jsonb_build_object(encode(device.join_eui, 'hex'), dev_nonces['0000000000000000'])
set dev_nonces = jsonb_build_object(encode(device.join_eui, 'hex'), dev_nonces->'0000000000000000')
from device
where device.dev_eui = device_keys.dev_eui;