-- Schema: bird__coinmarketcap
CREATE SCHEMA IF NOT EXISTS "bird__coinmarketcap";

-- Table: coins
CREATE TABLE "bird__coinmarketcap"."coins" (
    "id" BIGINT NOT NULL,
    "name" TEXT,
    "slug" TEXT,
    "symbol" TEXT,
    "status" TEXT,
    "category" TEXT,
    "description" TEXT,
    "subreddit" TEXT,
    "notice" TEXT,
    "tags" TEXT,
    "tag_names" TEXT,
    "website" TEXT,
    "platform_id" BIGINT,
    "date_added" TEXT,
    "date_launched" TEXT,
    CONSTRAINT "coins_pkey" PRIMARY KEY ("id")
);

-- Table: historical
CREATE TABLE "bird__coinmarketcap"."historical" (
    "date" DATE,
    "coin_id" BIGINT,
    "cmc_rank" BIGINT,
    "market_cap" DOUBLE PRECISION,
    "price" DOUBLE PRECISION,
    "open" DOUBLE PRECISION,
    "high" DOUBLE PRECISION,
    "low" DOUBLE PRECISION,
    "close" DOUBLE PRECISION,
    "time_high" TEXT,
    "time_low" TEXT,
    "volume_24h" DOUBLE PRECISION,
    "percent_change_1h" DOUBLE PRECISION,
    "percent_change_24h" DOUBLE PRECISION,
    "percent_change_7d" DOUBLE PRECISION,
    "circulating_supply" DOUBLE PRECISION,
    "total_supply" DOUBLE PRECISION,
    "max_supply" DOUBLE PRECISION,
    "num_market_pairs" BIGINT
);
