CREATE TABLE addresses (
    id BIGINT NOT NULL AUTO_INCREMENT,
    street1 TEXT NOT NULL ,
    street2 TEXT,
    city TEXT NOT NULL ,
    state TEXT,
    postal_code TEXT NOT NULL,
    country TEXT NOT NULL,
    created_at TIMESTAMP NOT NULL,
    updated_at TIMESTAMP NOT NULL,
    PRIMARY KEY (id)
);

CREATE TABLE users (
    id BIGINT NOT NULL AUTO_INCREMENT,
    user_name TEXT NOT NULL,
    secret_codes TEXT NOT NULL,
    current_token TEXT,
    token_creation TIMESTAMP,
    contact_number TEXT NOT NULL,
    email_address TEXT NOT NULL,
    mailing_address BIGINT NOT NULL,
    PRIMARY KEY (id),
    FOREIGN KEY (mailing_address) REFERENCES addresses(id)
);