-- ============================================
-- 此文件由 Meoo Cloud 自动生成，请勿修改
-- This file is auto-generated by Meoo Cloud, DO NOT MODIFY
-- ============================================

ALTER TABLE share_links ADD COLUMN IF NOT EXISTS status TEXT NOT NULL DEFAULT 'pending'; ALTER TABLE share_links ADD COLUMN IF NOT EXISTS clicked_at TIMESTAMPTZ; ALTER TABLE share_links ADD COLUMN IF NOT EXISTS responded_at TIMESTAMPTZ; ALTER TABLE share_links ADD COLUMN IF NOT EXISTS response_result TEXT; ALTER TABLE share_links ADD COLUMN IF NOT EXISTS reject_reason TEXT; ALTER TABLE share_links ADD COLUMN IF NOT EXISTS expires_at TIMESTAMPTZ; UPDATE share_links SET expires_at = COALESCE(expires_at, created_at + INTERVAL '30 minutes') WHERE expires_at IS NULL; CREATE INDEX IF NOT EXISTS idx_share_links_status ON share_links(status); CREATE INDEX IF NOT EXISTS idx_share_links_expires ON share_links(expires_at);
