新增打单产品渠道查询与替换功能
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
-- prc_order_bill: drop match_source / match_message.
|
||||
-- Idempotent.
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
SET @sql_drop_match_source = (
|
||||
SELECT IF(
|
||||
COUNT(*) > 0,
|
||||
'ALTER TABLE prc_order_bill DROP COLUMN match_source',
|
||||
'SELECT 1'
|
||||
)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prc_order_bill' AND COLUMN_NAME = 'match_source'
|
||||
);
|
||||
PREPARE stmt FROM @sql_drop_match_source;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @sql_drop_match_message = (
|
||||
SELECT IF(
|
||||
COUNT(*) > 0,
|
||||
'ALTER TABLE prc_order_bill DROP COLUMN match_message',
|
||||
'SELECT 1'
|
||||
)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prc_order_bill' AND COLUMN_NAME = 'match_message'
|
||||
);
|
||||
PREPARE stmt FROM @sql_drop_match_message;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user