7 lines
574 B
SQL
7 lines
574 B
SQL
-- 分子层「建数据能力」落地:bre_genotype_sample 补 sample_name 列
|
||||
|
|
-- DDL 原表(bre_tables.sql §3.7)无 sample_name;create_all 只建新表不改既有表,此处幂等 ALTER。
|
|||
|
|
-- sample_name 供 VCF 表头映射、UI 展示、指纹报告使用。
|
|||
|
|
ALTER TABLE bre_genotype_sample ADD COLUMN IF NOT EXISTS sample_name varchar(128);
|
|||
|
|
COMMENT ON COLUMN bre_genotype_sample.sample_name IS '样本名称(VCF 表头/UI 展示,可空)';
|
|||
|
|
CREATE INDEX IF NOT EXISTS ix_bre_genotype_sample_dataset_name ON bre_genotype_sample (dataset_id, sample_name);
|