You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
547 B
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

-- 1. SKU ,
alter table product_comment
add column sku_pic_url varchar(256) not null comment '' after sku_id;
alter table product_comment
add column sku_properties varchar(512) null
comment 'JSON [{propertId: , valueId: }, {propertId: , valueId: }]' after sku_pic_url;
-- 2.
update product_comment pc
join product_sku ps on pc.spu_id = ps.spu_id
set pc.sku_pic_url = ps.pic_url,
pc.sku_properties = ps.properties
where pc.sku_id is not null;