Files
sub2api/backend/migrations/170_add_grok_video_pricing_controls.sql
李建琦 6d655c9903
Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / shell (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
Security Scan / backend-security (push) Canceled after 0s
Security Scan / frontend-security (push) Canceled after 0s
Sub2API v1.0 - AI API 网关(二开初始版本,基于上游 Wei-Shaw/sub2api)
2026-08-21 18:30:13 +08:00

17 lines
1.1 KiB
SQL
Raw Permalink 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.
-- Add independent group pricing controls for Grok video generation.
-- Video prices intentionally do not backfill from image prices: image and video
-- generation must be priced separately.
ALTER TABLE groups
ADD COLUMN IF NOT EXISTS video_rate_independent BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN IF NOT EXISTS video_rate_multiplier DECIMAL(10,4) NOT NULL DEFAULT 1.0,
ADD COLUMN IF NOT EXISTS video_price_480p DECIMAL(20,8),
ADD COLUMN IF NOT EXISTS video_price_720p DECIMAL(20,8),
ADD COLUMN IF NOT EXISTS video_price_1080p DECIMAL(20,8);
COMMENT ON COLUMN groups.video_rate_independent IS '视频生成是否使用独立倍率;false 表示共享分组有效倍率';
COMMENT ON COLUMN groups.video_rate_multiplier IS '视频生成独立倍率,仅 video_rate_independent=true 时生效';
COMMENT ON COLUMN groups.video_price_480p IS '480p 视频生成单价 (USD)Grok 平台使用';
COMMENT ON COLUMN groups.video_price_720p IS '720p 视频生成单价 (USD)Grok 平台使用';
COMMENT ON COLUMN groups.video_price_1080p IS '1080p 视频生成单价 (USD)Grok 平台使用';