Merge pull request 'Supplier cargo migration to vn' (#456) from cargo_supplierFreighter into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #456 Reviewed-by: Bernat Exposito <bernat@verdnatura.es>
This commit is contained in:
commit
0542874fda
|
@ -1,3 +1,11 @@
|
|||
UPDATE `salix`.`ACL` SET `principalId` = 'deliveryBoss' WHERE (`id` = '194');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '97');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '100');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '103');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '202');
|
||||
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Town', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Province', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Supplier', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Supplier', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierLog', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
CREATE TABLE `vn`.supplierFreighter
|
||||
(
|
||||
supplierFk INT NOT NULL,
|
||||
CONSTRAINT supplierFreighter_pk
|
||||
PRIMARY KEY (supplierFk),
|
||||
CONSTRAINT supplier_id_fk
|
||||
FOREIGN KEY (supplierFk) REFERENCES supplier (id)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (286);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (454);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (582);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (470);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (775);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (812);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (1112);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (1242);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (1281);
|
||||
INSERT IGNORE INTO `vn`.supplierFreighter (supplierFk) VALUES (1765);
|
|
@ -0,0 +1,7 @@
|
|||
ALTER TABLE `vn`.travel
|
||||
DROP FOREIGN KEY travel_ibfk_4;
|
||||
|
||||
ALTER TABLE `vn`.travel
|
||||
ADD CONSTRAINT supplierFreighter_fk_4
|
||||
FOREIGN KEY (cargoSupplierFk) REFERENCES supplierFreighter (supplierFk)
|
||||
ON UPDATE CASCADE ON DELETE SET NULL;
|
|
@ -1,10 +0,0 @@
|
|||
UPDATE `salix`.`ACL` SET `principalId` = 'deliveryBoss' WHERE (`id` = '194');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '97');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '100');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '103');
|
||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '202');
|
||||
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Town', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Province', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('supplier', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierContact', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
|
@ -439,7 +439,7 @@ INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
|||
(2100, 1, 'Caixa Bank', 'CAIXESBB');
|
||||
|
||||
INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
|
||||
VALUES
|
||||
VALUES
|
||||
(241, 442, 'ES111122333344111122221111', 128);
|
||||
|
||||
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`)
|
||||
|
@ -1226,6 +1226,11 @@ INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email
|
|||
(3, 2, 321654987, NULL, 'supplier2@email.es', NULL, NULL),
|
||||
(4, 442, 321654987, NULL, NULL, 'observation442', NULL);
|
||||
|
||||
INSERT INTO `vn`.`supplierFreighter` (`supplierFk`)
|
||||
VALUES
|
||||
(1),
|
||||
(2);
|
||||
|
||||
INSERT INTO `cache`.`cache_calc`(`id`, `cache_id`, `cacheName`, `params`, `last_refresh`, `expires`, `created`, `connection_id`)
|
||||
VALUES
|
||||
(1, 2, 'available', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL),
|
||||
|
@ -1240,16 +1245,16 @@ INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
|
|||
(4, 4),
|
||||
(5, 6);
|
||||
|
||||
INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyFk`, `m3`, `kg`,`ref`, `totalEntries`)
|
||||
INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`)
|
||||
VALUES
|
||||
(1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1),
|
||||
(2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150, 2000, 'second travel', 2),
|
||||
(3, CURDATE(), CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 50.00, 500, 'fourth travel', 0),
|
||||
(5, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3, 2, 1, 50.00, 500, 'fifth travel', 1),
|
||||
(6, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 2, 1, 50.00, 500, 'sixth travel', 1),
|
||||
(7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'seventh travel', 2),
|
||||
(8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'eight travel', 1);
|
||||
(1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1),
|
||||
(2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150, 2000, 'second travel', 2, 2),
|
||||
(3, CURDATE(), CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1, 1),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 50.00, 500, 'fourth travel', 0, 2),
|
||||
(5, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3, 2, 1, 50.00, 500, 'fifth travel', 1, 1),
|
||||
(6, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 2, 1, 50.00, 500, 'sixth travel', 1, 2),
|
||||
(7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'seventh travel', 2, 1),
|
||||
(8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 2, 1, 50.00, 500, 'eight travel', 1, 2);
|
||||
|
||||
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `ref`,`isInventory`, `isRaid`, `notes`, `evaNotes`)
|
||||
VALUES
|
||||
|
|
Loading…
Reference in New Issue