-- liquibase formatted sql
-- changeset cyril:update_bom_weighting_score

ALTER TABLE bom_weighting_score
    ADD COLUMN code VARCHAR(255) NOT NULL AFTER deleted;

insert into bom_weighting_score (createdBy, version, modifiedBy, deleted, code, name, `range`, weighting)
select '2fi', '0', '2fi', '0', 'dark', '顔色深淺度', '1', '0.34'
where not exists(select 1 from bom_weighting_score where code = 'dark')
UNION ALL
select '2fi', '0', '2fi', '0', 'float', '浮沉', '5', '0.33'
where not exists(select 1 from bom_weighting_score where code = 'float')
UNION ALL
select '2fi', '0', '2fi', '0', 'dense', '濃淡程度 濃5 淡1', '5', '0.33'
where not exists(select 1 from bom_weighting_score where code = 'dense')
;