CREATE TABLE IF NOT EXISTS roles
(
    id          INTEGER PRIMARY KEY NOT NULL,
    definition  TEXT                NOT NULL
);

INSERT OR REPLACE INTO roles(id, definition) values(1, "Default");
INSERT OR REPLACE INTO roles(id, definition) values(2, "Administrator");

CREATE TABLE IF NOT EXISTS users
(
    id          INTEGER PRIMARY KEY NOT NULL,
    name        TEXT                NOT NULL,
    password    TEXT                NOT NULL,
    role        INTEGER             NOT NULL,
    FOREIGN KEY(role) REFERENCES roles(roleId)
);
