Scrum4Me/prisma/migrations/20260506010013_add_token_usage_fields/migration.sql
Scrum4Me Agent 0fd86c713a feat(ST-mgsu85hr): Prisma schema — token-velden op ClaudeJob + ModelPrice model
- Voeg model_id, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens (nullable) toe aan ClaudeJob
- Voeg nieuw ModelPrice model toe met per-1M prijsvelden en currency default USD
- Migratie 20260506010013_add_token_usage_fields aangemaakt en toegepast
- Seed uitgebreid met standaardprijzen voor claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5-20251001

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 03:01:35 +02:00

24 lines
851 B
SQL

-- AlterTable
ALTER TABLE "claude_jobs" ADD COLUMN "cache_read_tokens" INTEGER,
ADD COLUMN "cache_write_tokens" INTEGER,
ADD COLUMN "input_tokens" INTEGER,
ADD COLUMN "model_id" TEXT,
ADD COLUMN "output_tokens" INTEGER;
-- CreateTable
CREATE TABLE "model_prices" (
"id" TEXT NOT NULL,
"model_id" TEXT NOT NULL,
"input_price_per_1m" DECIMAL(12,6) NOT NULL,
"output_price_per_1m" DECIMAL(12,6) NOT NULL,
"cache_read_price_per_1m" DECIMAL(12,6) NOT NULL,
"cache_write_price_per_1m" DECIMAL(12,6) NOT NULL,
"currency" TEXT NOT NULL DEFAULT 'USD',
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "model_prices_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "model_prices_model_id_key" ON "model_prices"("model_id");