13 lines
374 B
SQL
13 lines
374 B
SQL
-- Your SQL goes here
|
|
CREATE TABLE localuser (
|
|
user_id VARCHAR NOT NULL PRIMARY KEY,
|
|
username VARCHAR NOT NULL UNIQUE,
|
|
password VARCHAR NOT NULL,
|
|
FOREIGN KEY(user_id) REFERENCES user(id)
|
|
);
|
|
|
|
CREATE TABLE user (
|
|
id VARCHAR NOT NULL PRIMARY KEY,
|
|
role TEXT CHECK(role IN ('admin', 'zoneadmin')) NOT NULL -- note: migrate to postgres so enum are actually a thing
|
|
);
|