Initial commit

This commit is contained in:
wangxuming
2026-07-12 15:53:24 +08:00
commit 68d61700d5
252 changed files with 23291 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
ALTER TABLE projects
ADD COLUMN eta_interval_seconds integer;
UPDATE projects
SET eta_interval_seconds = CASE
WHEN eta_mode = 'CONTINUOUS' THEN GREATEST(1, ROUND(60 / continuous_rate_per_minute)::integer)
ELSE GREATEST(1, ROUND(average_batch_interval_seconds::numeric / call_batch_size)::integer)
END;
ALTER TABLE projects
ALTER COLUMN eta_interval_seconds SET DEFAULT 60,
ALTER COLUMN eta_interval_seconds SET NOT NULL,
ADD CONSTRAINT projects_eta_interval_check CHECK (eta_interval_seconds BETWEEN 1 AND 86400);