Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

build: use big int for daily spend tables

Ishaan Jaffa8e7b0160832
diff --git a/litellm-proxy-extras/litellm_proxy_extras/migrations/20250509141545_use_big_int_for_daily_spend_tables/migration.sql b/litellm-proxy-extras/litellm_proxy_extras/migrations/20250509141545_use_big_int_for_daily_spend_tables/migration.sql
new file mode 100644
index 00000000000..582b7947a37
--- /dev/null
+++ b/litellm-proxy-extras/litellm_proxy_extras/migrations/20250509141545_use_big_int_for_daily_spend_tables/migration.sql
@@ -0,0 +1,27 @@
+-- AlterTable
+ALTER TABLE "LiteLLM_DailyTagSpend" ALTER COLUMN "prompt_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "completion_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "cache_read_input_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "cache_creation_input_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "api_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "successful_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "failed_requests" SET DATA TYPE BIGINT;
+
+-- AlterTable
+ALTER TABLE "LiteLLM_DailyTeamSpend" ALTER COLUMN "prompt_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "completion_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "api_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "successful_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "failed_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "cache_creation_input_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "cache_read_input_tokens" SET DATA TYPE BIGINT;
+
+-- AlterTable
+ALTER TABLE "LiteLLM_DailyUserSpend" ALTER COLUMN "prompt_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "completion_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "api_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "failed_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "successful_requests" SET DATA TYPE BIGINT,
+ALTER COLUMN "cache_creation_input_tokens" SET DATA TYPE BIGINT,
+ALTER COLUMN "cache_read_input_tokens" SET DATA TYPE BIGINT;
+