-- 上传件 —— 附件要能真正进活动,文件本身就得留着。 -- -- 存两样:**原字节**(留得住才叫「真实的文件」,人回头点得开)与**读出来的文本** -- (活动那一侧读得懂的只有文字)。读不出文本的类型 text 留空、note 说明为什么。 create table sys.upload ( id text primary key, name text not null, content_type text not null, size integer not null, bytes bytea not null, text text, note text not null default '', uploaded_by text, uploaded_at timestamptz not null default now() ); create index upload_time_idx on sys.upload (uploaded_at desc);