删除productCountryId
This commit is contained in:
@@ -944,7 +944,6 @@ CREATE TABLE `prc_order_bill` (
|
||||
`customer_priceset_id` bigint(20) DEFAULT NULL COMMENT '客户套餐绑定ID',
|
||||
`psv_id` bigint(20) DEFAULT NULL COMMENT '套餐版本ID,对应 prc_price_set_version.psv_id',
|
||||
`psd_id` bigint(20) DEFAULT NULL COMMENT '套餐明细ID,对应 prc_price_set_detail.psd_id',
|
||||
`product_country_id` bigint(20) DEFAULT NULL COMMENT '关联 product_country.detail_id',
|
||||
`weight_min` decimal(10,4) DEFAULT NULL COMMENT '重量段下限',
|
||||
`weight_max` decimal(10,4) DEFAULT NULL COMMENT '重量段上限',
|
||||
`weight_label` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '重量段展示',
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
-- prc_order_bill: drop unused product_country_id
|
||||
SET @db = DATABASE();
|
||||
|
||||
SET @sql = (
|
||||
SELECT IF(COUNT(*) > 0,
|
||||
'ALTER TABLE prc_order_bill DROP COLUMN product_country_id',
|
||||
'SELECT 1')
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'prc_order_bill' AND COLUMN_NAME = 'product_country_id'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user