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 0000000000..582b7947a3 --- /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; +