Compare commits

...

8 Commits

Author SHA1 Message Date
Jorge Penadés 8d93aa2aa0 fix: refs #5186 rollback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-29 14:30:57 +01:00
Jorge Penadés 7a5d1cc0e6 fix: refs #5186 rollback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-29 14:30:26 +01:00
Jorge Penadés 2b0364df27 fix: refs #5186 rollback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-29 14:27:19 +01:00
Jorge Penadés a6f95a9207 fix: refs #5186 remove saleGroup from ticketLog & right syntax
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-29 14:24:26 +01:00
Jorge Penadés 7036dffbca Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5186-createParkingBack
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-29 13:52:43 +01:00
Jorge Penadés dd7d33d156 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5186-createParkingBack
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-23 08:55:31 +01:00
Jorge Penadés c5d7943800 fix: refs #5186 set editorFk
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-21 11:36:40 +01:00
Jorge Penadés 742a6370c2 feat: refs #5186 parkingLog
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-21 10:25:04 +01:00
6 changed files with 5007 additions and 4949 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`parking_afterDelete`
AFTER DELETE ON `parking`
FOR EACH ROW
BEGIN
INSERT INTO parkingLog
SET `action` = 'delete',
`changedModel` = 'Parking',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`parking_beforeInsert`
BEFORE INSERT ON `parking`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
-- SET new.`code` = CONCAT(new.`column`,' - ',new.`row`) ;
END$$

View File

@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`parking_beforeUpdate`
BEFORE UPDATE ON `parking`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
-- SET new.`code` = CONCAT(new.`column`,' - ',new.`row`) ;
END$$

View File

@ -0,0 +1,44 @@
CREATE OR REPLACE TABLE `parkingLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) DEFAULT NULL,
`userFk` int(10) unsigned DEFAULT NULL,
`action` set('insert','update','delete','select') NOT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(),
`description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
`changedModel` enum('Parking','SaleGroup','SaleGroupDetail') NOT NULL DEFAULT 'Parking',
`oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)),
`newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)),
`changedModelId` int(11) NOT NULL,
`changedModelValue` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `logParkinguserFk` (`userFk`),
KEY `parkingLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
KEY `parkingLog_originFk` (`originFk`,`creationDate`),
CONSTRAINT `parkingOriginFk` FOREIGN KEY (`originFk`) REFERENCES `parking` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `parkingUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
ALTER TABLE vn.parking DROP COLUMN IF EXISTS editorFk;
ALTER TABLE IF EXISTS vn.parking ADD COLUMN editorFk INT;
ALTER TABLE vn.saleGroupDetail DROP COLUMN IF EXISTS editorFk;
ALTER TABLE IF EXISTS vn.SaleGroupDetail ADD COLUMN editorFk INT;

View File

@ -20,9 +20,6 @@
"type": "string",
"required": true
},
"sectorFk": {
"type": "number"
},
"code": {
"type": "string"
},
@ -35,6 +32,11 @@
"type": "hasMany",
"model": "saleGroup",
"foreignKey": "parkingFk"
},
"sector": {
"type": "belongsTo",
"model": "Sector",
"foreignKey": "sectorFk"
}
}
}