export structure and fix test #416

Merged
carlosjr merged 1 commits from 2508-export_production into dev 2020-10-20 11:58:12 +00:00
9 changed files with 6554 additions and 1346 deletions
Showing only changes of commit 7eed2ddd59 - Show all commits

View File

@ -110,13 +110,15 @@ BEGIN
SELECT `name` FROM `user` WHERE id = OLD.id;
END$$
CREATE TRIGGER role_beforeInsert
DROP TRIGGER IF EXISTS account.role_beforeInsert$$
CREATE DEFINER=`root`@`%` TRIGGER role_beforeInsert
BEFORE INSERT ON `role` FOR EACH ROW
BEGIN
CALL role_checkName(NEW.`name`);
END$$
END
CREATE TRIGGER role_beforeUpdate
DROP TRIGGER IF EXISTS account.role_beforeUpdate$$
CREATE DEFINER=`root`@`%` TRIGGER role_beforeUpdate
BEFORE UPDATE ON `role` FOR EACH ROW
BEGIN
IF !(NEW.`name` <=> OLD.`name`) THEN

View File

@ -1,7 +1,7 @@
DROP PROCEDURE IF EXISTS account.role_checkName;
DELIMITER $$
CREATE PROCEDURE account.role_checkName(vRoleName VARCHAR(255))
CREATE DEFINER=`root`@`%` PROCEDURE account.role_checkName(vRoleName VARCHAR(255))
BEGIN
/**
* Checks that role name meets the necessary syntax requirements, otherwise it

File diff suppressed because one or more lines are too long

View File

@ -2116,4 +2116,18 @@ INSERT INTO `vn`.`tabletDepartment`(`tabletFk`, `departmentFk`)
(1, 23),
(2, 1);
INSERT INTO `vn`.`campaign`(`code`, `dated`)
VALUES
('valentinesDay', CONCAT(YEAR(CURDATE()), '-02-14')),
('valentinesDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-02-14')),
('valentinesDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -2 YEAR)), '-02-14')),
('valentinesDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -3 YEAR)), '-02-14')),
('mothersDay', CONCAT(YEAR(CURDATE()), '-05-05')),
('mothersDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-05-05')),
('mothersDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -2 YEAR)), '-05-05')),
('mothersDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -3 YEAR)), '-05-05')),
('allSaints', CONCAT(YEAR(CURDATE()), '-11-01')),
('allSaints', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-11-01')),
('allSaints', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -2 YEAR)), '-11-01')),
('allSaints', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -3 YEAR)), '-11-01'));

File diff suppressed because it is too large Load Diff

View File

@ -82,3 +82,10 @@ TABLES=(
workcenter
)
dump_tables ${TABLES[@]}
TABLES=(
sage
TiposIva
TiposTransacciones
)
dump_tables ${TABLES[@]}

View File

@ -9,6 +9,7 @@ SCHEMAS=(
nst
pbx
postgresql
sage
salix
stock
util

View File

@ -7,7 +7,7 @@ describe('Client activeWorkersWithRole', () => {
let isSalesPerson = await app.models.Account.hasRole(result[0].id, 'salesPerson');
expect(result.length).toEqual(16);
expect(result.length).toEqual(17);
expect(isSalesPerson).toBeTruthy();
});

View File

@ -6,7 +6,7 @@ describe('Client listWorkers', () => {
.then(result => {
let amountOfEmployees = Object.keys(result).length;
expect(amountOfEmployees).toEqual(51);
expect(amountOfEmployees).toEqual(53);
done();
})
.catch(done.fail);