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

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

CREATE TABLE poll_options (
       id BIGINT PRIMARY KEY AUTO_INCREMENT,
       value TEXT,
       poll_id BIGINT,
       FOREIGN KEY (poll_id) REFERENCES polls(id)
);

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