CREATE TABLE users (
       id BIGINT PRIMARY KEY AUTO_INCREMENT,
       username VARCHAR(255),
       password VARCHAR(255)
);

CREATE TABLE pools (
       id BIGINT PRIMARY KEY AUTO_INCREMENT,
       title VARCHAR(255)
);

CREATE TABLE pool_options (
       id BIGINT PRIMARY KEY AUTO_INCREMENT,
       value TEXT,
       pool_id BIGINT,
       FOREIGN KEY (pool_id) REFERENCES pools(id)
);

CREATE TABLE answers (
       id BIGINT PRIMARY KEY AUTO_INCREMENT,
       option_id BIGINT,
       create_at DATETIME DEFAULT CURRENT_TIMESTAMP,
       FOREIGN KEY (option_id) REFERENCES pool_options(id)
);
