Skip to content

Prompt as Code | GPT Image 2 / 2.5 提示词与案例库,530+ 个案例、20+ 套工业级模板与可复用 Skills,新增 2.5 同提示词对比专区,附完整提示词与生成记录,持续更新。

979 B
Raw Blame
alter table public.generation_reservations
  add column if not exists provider text not null default 'legacy',
  add column if not exists provider_task_id text,
  add column if not exists provider_cost_usd numeric(12, 6),
  add column if not exists provider_result_url text,
  add column if not exists provider_result_expires_at timestamptz;

create unique index if not exists generation_reservations_provider_task_idx
  on public.generation_reservations (provider, provider_task_id)
  where provider_task_id is not null;

create index if not exists generation_reservations_pending_provider_idx
  on public.generation_reservations (provider, created_at)
  where status = 'pending';

alter table public.generation_reservations
  drop constraint if exists generation_reservations_provider_cost_nonnegative;

alter table public.generation_reservations
  add constraint generation_reservations_provider_cost_nonnegative
  check (provider_cost_usd is null or provider_cost_usd >= 0);