add users to database

This commit is contained in:
2023-02-07 12:17:46 +01:00
parent 096afa6672
commit 588d9270f9
3 changed files with 45 additions and 2 deletions

View File

@ -127,7 +127,7 @@ The required schema in the database is
topic VARCHAR(256) NOT NULL,
rw INTEGER(1) NOT NULL DEFAULT 1, -- 1 is read, 2 is write, 3 is readwrite, 4 is subscribe
PRIMARY KEY (id),
CONSTRAINT `fk_book_author`
CONSTRAINT `fk_users_user`
FOREIGN KEY (user) REFERENCES users_t (id)
ON DELETE CASCADE
ON UPDATE CASCADE
@ -145,6 +145,10 @@ The password is generated using the `pw` tool provided by mosquitto-go-auth, whi
For further information consult the readme and the examples in the mosquitto-go-auth project (https://github.com/iegomez/mosquitto-go-auth or https://github.com/wollud1969/mosquitto-go-auth).
For MariaDB and PostgreSQL there are prepared table create statements in the repository,
For PostgresSQL there is a prepared Python tool in the directory `tools` available to added users into the database.
## Preparing configuration and certificates