{
  "version": "6",
  "dialect": "mysql",
  "id": "72655266-65da-408e-bfd8-9f3a4ad817a5",
  "prevIds": ["00000000-0000-0000-0000-000000000000"],
  "ddl": [
    {
      "name": "stat",
      "entityType": "tables"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": true,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(16)",
      "notNull": true,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "grain",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "datetime",
      "notNull": true,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "period_start",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "datetime",
      "notNull": true,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "period_end",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(64)",
      "notNull": true,
      "autoIncrement": false,
      "default": "'all'",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "dataset",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(64)",
      "notNull": true,
      "autoIncrement": false,
      "default": "'all'",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "tier",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(64)",
      "notNull": true,
      "autoIncrement": false,
      "default": "'all'",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "client",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(64)",
      "notNull": true,
      "autoIncrement": false,
      "default": "'all'",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "source",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(128)",
      "notNull": true,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "provider",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(256)",
      "notNull": true,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "model",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "varchar(256)",
      "notNull": true,
      "autoIncrement": false,
      "default": "''",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "provider_model",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "sessions",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "requests",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "input_tokens",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "output_tokens",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "reasoning_tokens",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "cache_read_tokens",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "total_tokens",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "input_cost_microcents",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "output_cost_microcents",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "total_cost_microcents",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "decimal(12,2)",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "avg_duration_ms",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "p50_duration_ms",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "p95_duration_ms",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "decimal(12,2)",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "avg_ttfb_ms",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "p50_ttfb_ms",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "p95_ttfb_ms",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "decimal(12,4)",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "avg_output_tps",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "success_count",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "error_count",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "bigint",
      "notNull": true,
      "autoIncrement": false,
      "default": "0",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "sample_count",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "rank_by_tokens",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "rank_by_requests",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "int",
      "notNull": false,
      "autoIncrement": false,
      "default": null,
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "rank_by_cost",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "datetime",
      "notNull": true,
      "autoIncrement": false,
      "default": "(now())",
      "onUpdateNow": false,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "type": "datetime",
      "notNull": true,
      "autoIncrement": false,
      "default": "(now())",
      "onUpdateNow": true,
      "onUpdateNowFsp": null,
      "charSet": null,
      "collation": null,
      "generated": null,
      "name": "updated_at",
      "entityType": "columns",
      "table": "stat"
    },
    {
      "columns": ["id"],
      "name": "PRIMARY",
      "table": "stat",
      "entityType": "pks"
    },
    {
      "columns": [
        {
          "value": "grain",
          "isExpression": false
        },
        {
          "value": "period_start",
          "isExpression": false
        },
        {
          "value": "dataset",
          "isExpression": false
        },
        {
          "value": "tier",
          "isExpression": false
        },
        {
          "value": "client",
          "isExpression": false
        },
        {
          "value": "source",
          "isExpression": false
        },
        {
          "value": "provider",
          "isExpression": false
        },
        {
          "value": "model",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "using": null,
      "algorithm": null,
      "lock": null,
      "nameExplicit": true,
      "name": "uniq_model_period",
      "entityType": "indexes",
      "table": "stat"
    },
    {
      "columns": [
        {
          "value": "grain",
          "isExpression": false
        },
        {
          "value": "period_start",
          "isExpression": false
        },
        {
          "value": "dataset",
          "isExpression": false
        },
        {
          "value": "tier",
          "isExpression": false
        },
        {
          "value": "total_tokens",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "using": null,
      "algorithm": null,
      "lock": null,
      "nameExplicit": true,
      "name": "idx_leaderboard_tokens",
      "entityType": "indexes",
      "table": "stat"
    },
    {
      "columns": [
        {
          "value": "model",
          "isExpression": false
        },
        {
          "value": "grain",
          "isExpression": false
        },
        {
          "value": "period_start",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "using": null,
      "algorithm": null,
      "lock": null,
      "nameExplicit": true,
      "name": "idx_model",
      "entityType": "indexes",
      "table": "stat"
    }
  ],
  "renames": []
}
