CREATE DATABASE IF NOT EXISTS backup_db_data;
USE backup_db_data;

CREATE TABLE IF NOT EXISTS users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    email VARCHAR(255) NOT NULL UNIQUE,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Insert a test user for testing "Email exist" scenario
INSERT INTO users (email) VALUES ('test@example.com') ON DUPLICATE KEY UPDATE id=id;
