This commit is contained in:
Stian Fredrik Aune
2021-05-23 14:00:42 +02:00
parent f7f8989d20
commit 21157e4330
25 changed files with 24454 additions and 11560 deletions
+20
View File
@@ -0,0 +1,20 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE device
(
id INT NOT NULL AUTO_INCREMENT,
bridge_id INT NOT NULL,
internal_id VARCHAR(255) NOT NULL,
icon CHAR NOT NULL,
name VARCHAR(255) NOT NULL,
capabilities VARCHAR(255) NOT NULL,
button_names VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE device;
-- +goose StatementEnd
@@ -0,0 +1,17 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE device_property
(
device_id INT NOT NULL,
prop_key VARCHAR(255) NOT NULL,
prop_value VARCHAR(255) NOT NULL,
is_user TINYINT NOT NULL DEFAULT 0,
PRIMARY KEY (device_id, prop_key)
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE device_property;
-- +goose StatementEnd
+20
View File
@@ -0,0 +1,20 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE device_state
(
device_id INT NOT NULL,
hue DOUBLE NOT NULL,
saturation DOUBLE NOT NULL,
kelvin INT NOT NULL,
power TINYINT NOT NULL,
intensity INT NOT NULL,
PRIMARY KEY (device_id)
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE device_state;
-- +goose StatementEnd