fix: database types
This commit is contained in:
parent
beea18f70b
commit
b3f75f4004
10 changed files with 76 additions and 55 deletions
|
@ -18,27 +18,34 @@ create table controllers
|
|||
|
||||
create table relays
|
||||
(
|
||||
id INTEGER not null
|
||||
id INTEGER
|
||||
not null
|
||||
primary key
|
||||
unique,
|
||||
name VARCHAR(128),
|
||||
number INTEGER not null,
|
||||
controller_id VARCHAR(33) not null
|
||||
number INTEGER
|
||||
not null,
|
||||
controller_id VARCHAR(33)
|
||||
not null
|
||||
references controllers (id),
|
||||
active_schedule_id VARCHAR(33)
|
||||
references schedules,
|
||||
active_schedule_id int
|
||||
references schedules (id),
|
||||
tag vARCHAR(64)
|
||||
);
|
||||
|
||||
create table schedules
|
||||
(
|
||||
id VARCHAR(33) not null
|
||||
id INTEGER
|
||||
not null
|
||||
primary key
|
||||
unique,
|
||||
uid VARCHAR(33)
|
||||
not null
|
||||
unique,
|
||||
name VARCHAR(128),
|
||||
periods BLOB,
|
||||
tag vARCHAR(64)
|
||||
);
|
||||
|
||||
INSERT INTO schedules (id, name, periods) VALUES (x'6f666600000000000000000000000000', 'off', x'00');
|
||||
INSERT INTO schedules (id, name, periods) VALUES (x'6f6e0000000000000000000000000000', 'on', x'010000009F05');
|
||||
INSERT INTO schedules (uid, name, periods) VALUES (x'6f666600000000000000000000000000', 'off', x'00');
|
||||
INSERT INTO schedules (uid, name, periods) VALUES (x'6f6e0000000000000000000000000000', 'on', x'010000009F05');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue