added a column to link to a settings version and to store the settings.json file from the device.
parent
ce7fa1a193
commit
beecb4a4f2
|
@ -1,13 +1,22 @@
|
|||
CREATE TABLE device.device_skill (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
device_id uuid NOT NULL REFERENCES device.device ON DELETE CASCADE,
|
||||
skill_id uuid NOT NULL REFERENCES skill.skill,
|
||||
install_method text NOT NULL DEFAULT 'msm',
|
||||
install_status text NOT NULL DEFAULT 'installed',
|
||||
id uuid PRIMARY KEY
|
||||
DEFAULT gen_random_uuid(),
|
||||
device_id uuid NOT NULL
|
||||
REFERENCES device.device
|
||||
ON DELETE CASCADE,
|
||||
skill_id uuid NOT NULL
|
||||
REFERENCES skill.skill,
|
||||
install_method text NOT NULL
|
||||
DEFAULT 'msm',
|
||||
install_status text NOT NULL
|
||||
DEFAULT 'installed',
|
||||
install_failure_reason text,
|
||||
install_ts timestamp,
|
||||
update_ts timestamp,
|
||||
beta boolean NOT NULL DEFAULT FALSE,
|
||||
insert_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
install_ts TIMESTAMP,
|
||||
update_ts TIMESTAMP,
|
||||
skill_setting_meta_id uuid
|
||||
REFERENCES skill.setting_meta,
|
||||
settings json,
|
||||
insert_ts TIMESTAMP NOT NULL
|
||||
DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE (device_id, skill_id)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue