2021-03-26 22:30:38 +00:00
|
|
|
-- Your SQL goes here
|
|
|
|
CREATE TABLE localuser (
|
|
|
|
user_id VARCHAR NOT NULL PRIMARY KEY,
|
2021-03-27 05:45:59 +00:00
|
|
|
username VARCHAR NOT NULL UNIQUE,
|
2021-03-26 22:30:38 +00:00
|
|
|
password VARCHAR NOT NULL,
|
|
|
|
FOREIGN KEY(user_id) REFERENCES user(id)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE user (
|
|
|
|
id VARCHAR NOT NULL PRIMARY KEY,
|
2021-04-03 06:16:54 +00:00
|
|
|
role TEXT CHECK(role IN ('admin', 'zoneadmin')) NOT NULL -- note: migrate to postgres so enum are actually a thing
|
2021-03-26 22:30:38 +00:00
|
|
|
);
|