matrix-meshtastic-bridge/migrations/20241011053437_init.sql
Finn b19cafc2b2
Some checks failed
/ build-container (push) Failing after 3m51s
wip
2024-10-15 23:22:07 -07:00

21 lines
672 B
SQL

CREATE TABLE device (
id INTEGER PRIMARY KEY NOT NULL,
node_num INTEGER UNIQUE NOT NULL, -- meshtastic device node number (my_node_num)
space VARCHAR(100) NOT NULL, -- Matrix space to use for this device
control_room VARCHAR(100) NOT NULL -- control room within the space
);
CREATE TABLE remote_user (
id INTEGER PRIMARY KEY NOT NULL,
device INTEGER NOT NULL REFERENCES device(id),
node_id INTEGER NOT NULL,
node_short_name VARCHAR(4) NOT NULL,
node_name VARCHAR(100) NOT NULL,
room VARCHAR(100) NOT NULL
);
CREATE TABLE matrix_state (
id INTEGER PRIMARY KEY NOT NULL,
key TEXT UNIQUE NOT NULL,
value TEXT NOT NULL
);