Native gui: ongoing work, cables and fuses

This commit is contained in:
2026-09-13 17:19:37 +02:00
parent d72147c012
commit 2250fb9743
15 changed files with 2064 additions and 54 deletions
+22
View File
@@ -484,3 +484,25 @@ CREATE TABLE signalk (
FOREIGN KEY fk_signalk_vessel (vid)
REFERENCES vessel(vid)
) ENGINE=InnoDB;
/* Token
- Python: secrets.token_hex(8)
- PHP: bin2hex(random_bytes(8)) */
CREATE TABLE recordlock (
lock_table varchar(40) NOT NULL,
lock_key int(10) NOT NULL,
token varchar(16) NOT NULL,
userid smallint(6) NOT NULL,
created_at timestamp NOT NULL DEFAULT current_timestamp,
last_seen timestamp NOT NULL DEFAULT current_timestamp,
PRIMARY KEY (lock_table, lock_key),
UNIQUE KEY ix_lock_token (token)
) ENGINE=MEMORY;
/* Use with: UPDATE revision SET changed=CURRENT_TIMESTAMP WHERE revid=? */
CREATE TABLE revision (
revid smallint(6) UNSIGNED NOT NULL,
changed timestamp NOT NULL,
PRIMARY KEY (revid),
INDEX ix_revision_ts (changed) -- for select by timestamp
) ENGINE=MEMORY;