Virtue-Digital-Indonesia / nle_connect

0 stars 0 forks source link

add customer id booking header #329

Closed Didikirawanvalid closed 1 year ago

Didikirawanvalid commented 1 year ago

319

Alter table booking header

ALTER TABLE `nlebackend`.`booking_header` 
ADD COLUMN `CUSTOMER_ID` INT NOT NULL AFTER `DEPO_OWNER_ACCOUNT_ID`;

ALTER TABLE `nlebackend`.`booking_header` 
ADD KEY `CUSTOMER_ID` (`CUSTOMER_ID`);

UPDATE NLEBACKEND.BOOKING_HEADER SET CUSTOMER_ID = 7 WHERE DEPO_OWNER_ACCOUNT_ID = 45;
//akun mas yusuf tidak ada sementara saya pake punya mas daniel
UPDATE NLEBACKEND.BOOKING_HEADER SET CUSTOMER_ID = 7 WHERE DEPO_OWNER_ACCOUNT_ID = 54; 
UPDATE NLEBACKEND.BOOKING_HEADER SET CUSTOMER_ID = 5 WHERE DEPO_OWNER_ACCOUNT_ID = 99;

ALTER TABLE `nlebackend`.`booking_header`
ADD CONSTRAINT `booking_header_ibfk_2` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `booking_customer` (`ID`);