CREATE TABLE IF NOT EXISTS raw_data
(
  id                             SERIAL PRIMARY KEY,
  open_time                      BIGINT NOT NULL,
  open_price                     TEXT NOT NULL,
  high_price                     TEXT NOT NULL,
  low_price                      TEXT NOT NULL,
  close_price                    TEXT NOT NULL,
  volume                         TEXT NOT NULL,
  close_time                     BIGINT NOT NULL,
  asset_volume                   TEXT NOT NULL,
  num_of_trades                  SMALLINT NOT NULL,
  taker_buy_base_asset_volume    TEXT NOT NULL,
  taker_buy_quote_asset_volume   TEXT NOT NULL
);

CREATE TABLE IF NOT EXISTS formatted_data
(
  id        SERIAL PRIMARY KEY,
  timestamp BIGINT NOT NULL,
  price     REAL NOT NULL
);
