Merge pull request 'export structure and fix test' (#416) from 2508-export_production into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #416 Reviewed-by: Carlos Jimenez <carlosjr@verdnatura.es>
This commit is contained in:
commit
e5f6e41287
|
@ -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
|
||||
|
|
|
@ -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
|
@ -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
|
@ -82,3 +82,10 @@ TABLES=(
|
|||
workcenter
|
||||
)
|
||||
dump_tables ${TABLES[@]}
|
||||
|
||||
TABLES=(
|
||||
sage
|
||||
TiposIva
|
||||
TiposTransacciones
|
||||
)
|
||||
dump_tables ${TABLES[@]}
|
|
@ -9,6 +9,7 @@ SCHEMAS=(
|
|||
nst
|
||||
pbx
|
||||
postgresql
|
||||
sage
|
||||
salix
|
||||
stock
|
||||
util
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue