CREATE TABLE series (
    id INT NOT NULL AUTO_INCREMENT,
    code INT NOT NULL,
    title TEXT NOT NULL,
    released TEXT NOT NULL,
    webImg TEXT NOT NULL,
    PRIMARY KEY (id),
    UNIQUE code (code)
) ENGINE = InnoDB;

CREATE TABLE movies (
    id INT NOT NULL AUTO_INCREMENT,
    code INT NOT NULL,
    title TEXT NOT NULL,
    released TEXT NOT NULL,
    webImg TEXT NOT NULL,
    PRIMARY KEY (id),
    UNIQUE code (code)
) ENGINE = InnoDB;

CREATE TABLE games (
    id INT NOT NULL AUTO_INCREMENT,
    code INT NOT NULL,
    title TEXT NOT NULL,
    released TEXT NOT NULL,
    webImg TEXT NOT NULL,
    PRIMARY KEY (id),
    UNIQUE code (code)
) ENGINE = InnoDB;

CREATE TABLE userData (
    id INT NOT NULL AUTO_INCREMENT,
    name TEXT NOT NULL,
    value TEXT NOT NULL,
    PRIMARY KEY (id),
) ENGINE = InnoDB;

INSERT INTO userData (name, value) VALUES ("pass", "");

INSERT INTO userData (name, value) VALUES ("omdb_key", "");

INSERT INTO userData (name, value) VALUES ("twitch_client_id", "");

INSERT INTO
    userData (name, value) VALUES ("twitch_client_secret", "");

CREATE TABLE bankCardTransaction (
    id INT NOT NULL AUTO_INCREMENT,
    day INT NOT NULL,
    month INT NOT NULL,
    year INT NOT NULL,
    amount INT NOT NULL,
    type INT NOT NULL,
    raw TEXT NOT NULL,
    company TEXT NOT NULL,
    PRIMARY KEY (id),
    INDEX date(day, month, year),
    INDEX type (type)
) ENGINE = InnoDB;