-- drop tables here
DROP TABLE IF EXISTS Account;
DROP TABLE IF EXISTS Tactic;

CREATE TABLE Account
(
    id       integer PRIMARY KEY AUTOINCREMENT,
    email    varchar UNIQUE NOT NULL,
    username varchar        NOT NULL,
    token    varchar UNIQUE NOT NULL,
    hash     varchar        NOT NULL
);

CREATE TABLE Tactic
(
    id            integer PRIMARY KEY AUTOINCREMENT,
    name          varchar                             NOT NULL,
    creation_date timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
    owner         integer                             NOT NULL,
    FOREIGN KEY (owner) REFERENCES Account
);

