-- Add migration script here
CREATE TABLE IF NOT EXISTS trades(
    symbol TEXT NOT NULL,
    amount REAL NOT NULL,
    taker_side TEXT NOT NULL,
    quantity REAL NOT NULL,
    create_time DATETIME NOT NULL,
    price REAL NOT NULL,
    id TEXT NOT NULL,
    ts INT NOT NULL
);

CREATE TABLE IF NOT EXISTS candles(
    pair TEXT NOT NULL,
    interval TEXT NOT NULL,
    low REAL NOT NULL,
    high REAL NOT NULL,
    open REAL NOT NULL,
    close REAL NOT NULL,
    amount REAL NOT NULL,
    quantity REAL NOT NULL,
    buy_taker_amount REAL NOT NULL,
    buy_taker_quantity REAL NOT NULL,
    trade_count INT NOT NULL,
    ts INT NOT NULL,
    weighted_average REAL NOT NULL,
    start_time DATETIME NOT NULL,
    close_time DATETIME NOT NULL,

    PRIMARY KEY(pair, interval, start_time)
);