Files
iddaai-be/prisma/migrations/manual_add_odds_to_live_matches.sql
T
fahricansecer 2f0b85a0c7
Deploy Iddaai Backend / build-and-deploy (push) Failing after 18s
first (part 2: other directories)
2026-04-16 15:11:25 +03:00

14 lines
642 B
SQL
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- AlterTable: Add odds columns to live_matches
-- Run this migration when DB is accessible
ALTER TABLE "live_matches"
ADD COLUMN IF NOT EXISTS "odds" JSONB,
ADD COLUMN IF NOT EXISTS "odds_updated_at" TIMESTAMP(3);
-- Create index for faster queries on odds_updated_at
CREATE INDEX IF NOT EXISTS "live_matches_odds_updated_at_idx" ON "live_matches"("odds_updated_at");
-- Comment for documentation
COMMENT ON COLUMN "live_matches"."odds" IS 'Bahis oranları JSON: {"MS": {"1": 2.10, "X": 3.40, "2": 3.20}, "AU25": {"Alt": 2.05, "Üst": 1.75}}';
COMMENT ON COLUMN "live_matches"."odds_updated_at" IS 'Oranların son güncellenme zamanı';