优化
This commit is contained in:
@@ -9075,6 +9075,21 @@ PREPARE ocean_add_carrier_code_stmt FROM @ocean_add_carrier_code;
|
|||||||
EXECUTE ocean_add_carrier_code_stmt;
|
EXECUTE ocean_add_carrier_code_stmt;
|
||||||
DEALLOCATE PREPARE ocean_add_carrier_code_stmt;
|
DEALLOCATE PREPARE ocean_add_carrier_code_stmt;
|
||||||
|
|
||||||
|
SET @ocean_drop_carrier_code_check = (
|
||||||
|
SELECT IF(COUNT(*) > 0,
|
||||||
|
'ALTER TABLE fl_ocean_booking DROP CHECK chk_ocean_booking_carrier_code',
|
||||||
|
'SELECT 1')
|
||||||
|
FROM information_schema.table_constraints
|
||||||
|
WHERE constraint_schema=DATABASE() AND table_name='fl_ocean_booking'
|
||||||
|
AND constraint_name='chk_ocean_booking_carrier_code' AND constraint_type='CHECK'
|
||||||
|
);
|
||||||
|
PREPARE ocean_drop_carrier_code_check_stmt FROM @ocean_drop_carrier_code_check;
|
||||||
|
EXECUTE ocean_drop_carrier_code_check_stmt;
|
||||||
|
DEALLOCATE PREPARE ocean_drop_carrier_code_check_stmt;
|
||||||
|
ALTER TABLE fl_ocean_booking
|
||||||
|
ADD CONSTRAINT chk_ocean_booking_carrier_code CHECK
|
||||||
|
(carrier_code IS NULL OR carrier_code IN ('MATSON','SML','ZIM','COSCO','EMC','HEDE','OTHER'));
|
||||||
|
|
||||||
-- CREATE TABLE IF NOT EXISTS does not reconcile a database initialized before customer became optional.
|
-- CREATE TABLE IF NOT EXISTS does not reconcile a database initialized before customer became optional.
|
||||||
ALTER TABLE fl_ocean_booking
|
ALTER TABLE fl_ocean_booking
|
||||||
MODIFY COLUMN customer_id BIGINT UNSIGNED NULL COMMENT '可选客户ID快照',
|
MODIFY COLUMN customer_id BIGINT UNSIGNED NULL COMMENT '可选客户ID快照',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ paths:
|
|||||||
- {name: customerId, in: query, schema: {type: integer, format: int64, minimum: 1}}
|
- {name: customerId, in: query, schema: {type: integer, format: int64, minimum: 1}}
|
||||||
- {name: oceanBookingId, in: query, schema: {type: integer, format: int64, minimum: 1}}
|
- {name: oceanBookingId, in: query, schema: {type: integer, format: int64, minimum: 1}}
|
||||||
- {name: containerBookingId, in: query, schema: {type: integer, format: int64, minimum: 1}}
|
- {name: containerBookingId, in: query, schema: {type: integer, format: int64, minimum: 1}}
|
||||||
- {name: carrierCode, in: query, schema: {$ref: '#/components/schemas/CarrierCode'}}
|
- {name: carrierCode, in: query, schema: {$ref: '#/components/schemas/TaskCarrierCode'}}
|
||||||
- {name: status, in: query, schema: {$ref: '#/components/schemas/QueryStatus'}}
|
- {name: status, in: query, schema: {$ref: '#/components/schemas/QueryStatus'}}
|
||||||
- {name: expired, in: query, schema: {type: boolean}}
|
- {name: expired, in: query, schema: {type: boolean}}
|
||||||
- {name: keyword, in: query, schema: {type: string, maxLength: 128}}
|
- {name: keyword, in: query, schema: {type: string, maxLength: 128}}
|
||||||
|
|||||||
Reference in New Issue
Block a user