fix(changes): refs #6005 remove changes files
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Pablo Natek 2024-03-11 13:39:03 +01:00
parent 8815f07850
commit 421ca8654d
5 changed files with 8 additions and 53 deletions

View File

@ -67,7 +67,7 @@ module.exports = Self => {
continue;
}
const newParams = Object.assign({}, queueParams, sendParams, {created: queue.created});
const newParams = Object.assign({}, queueParams, sendParams, {queueCreated: queue.created});
const email = new Email(queueName, newParams);
if (process.env.NODE_ENV != 'test')

View File

@ -1,10 +0,0 @@
ALTER TABLE `vn`.`packingSite` DROP FOREIGN KEY `packingSite_FK_4`;
ALTER TABLE `vn`.`arcRead` DROP FOREIGN KEY `worker_printer_FK`;
ALTER TABLE `vn`.`host` DROP FOREIGN KEY `configHost_FK`;
ALTER TABLE `vn`.`operator` DROP FOREIGN KEY `operator_FK_5`;
ALTER TABLE `vn`.`packingSite` DROP FOREIGN KEY `packingSite_FK_1`;
ALTER TABLE `vn`.`printQueue` DROP FOREIGN KEY `printQueue_printerFk`;
ALTER TABLE `vn`.`sector` DROP FOREIGN KEY `sector_FK_1`;
ALTER TABLE `vn`.`worker` DROP FOREIGN KEY `worker_FK`;

View File

@ -1,21 +0,0 @@
ALTER TABLE `vn`.`printer` MODIFY COLUMN `id` int unsigned auto_increment NOT NULL;
ALTER TABLE `vn`.`arcRead` MODIFY COLUMN `printerFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`arcRead` ADD CONSTRAINT `arcRead_FK` FOREIGN KEY (printerFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `vn`.`host` MODIFY COLUMN `printerFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`host` ADD CONSTRAINT `host_FK` FOREIGN KEY (printerFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE `vn`.`operator` MODIFY COLUMN `labelerFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`operator` ADD CONSTRAINT `operator_FK_4` FOREIGN KEY (labelerFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `vn`.`packingSite` MODIFY COLUMN `printerRfidFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`packingSite` MODIFY COLUMN `printerFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`packingSite` ADD CONSTRAINT `packingSite_FK_1` FOREIGN KEY (printerFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE RESTRICT;
ALTER TABLE `vn`.`packingSite` ADD CONSTRAINT `packingSite_FK_4` FOREIGN KEY (printerRfidFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE `vn`.`printQueue` MODIFY COLUMN `printerFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`printQueue` ADD CONSTRAINT `printQueue_FK` FOREIGN KEY (id) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE `vn`.`sector` MODIFY COLUMN `mainPrinterFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `vn`.`sector` ADD CONSTRAINT `sector_FK` FOREIGN KEY (mainPrinterFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -1,18 +0,0 @@
ALTER TABLE `util`.`notification` ADD delay INT NULL
COMMENT 'Minimum Milliseconds Interval to Prevent Spam from Same-Type Notifications';
ALTER TABLE vn.sector DROP FOREIGN KEY sector_FK;
ALTER TABLE `vn`.`sector` CHANGE `mainPrinterFk` `backupPrinterFk` int unsigned DEFAULT NULL NULL;
ALTER TABLE `util`.`notificationSubscription` DROP FOREIGN KEY `notificationSubscription_ibfk_1`;
ALTER TABLE `util`.`notificationQueue` DROP FOREIGN KEY `nnotificationQueue_ibfk_1`;
ALTER TABLE `util`.`notificationAcl` DROP FOREIGN KEY `notificationAcl_ibfk_1`;
ALTER TABLE `util`.`notification` MODIFY COLUMN `id` int(11) auto_increment NOT NULL;
ALTER TABLE `util`.`notificationSubscription` ADD CONSTRAINT `notificationSubscription_Fk` FOREIGN KEY (`notificationFk`) REFERENCES `util`.`notification`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `util`.`notificationQueue` ADD CONSTRAINT `notificationQueue_Fk` FOREIGN KEY (`notificationFk`) REFERENCES `util`.`notification`(`name`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `util`.`notificationAcl` ADD CONSTRAINT `notificationAcl_Fk` FOREIGN KEY (`notificationFk`) REFERENCES `util`.`notification`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -5,8 +5,12 @@ const name = 'backup-printer-selected';
module.exports = {
name: name,
async serverPrefetch() {
const notifications = await this.rawSqlFromDef('previousNotifications', [name, this.created, this.created]);
if (!notifications.length || checkDuplicates(notifications, this.labelerId, this.sectorId))
const notifications = await this.rawSqlFromDef(
'previousNotifications',
[name, this.queueCreated, this.queueCreated]
);
if (checkDuplicates(notifications, this.labelerId, this.sectorId))
throw new Error('Previous notification sended with the same parameters');
this.sector = await this.findOneFromDef('sector', [this.sectorId]);
@ -33,7 +37,7 @@ module.exports = {
type: Number,
required: true
},
created: {
queueCreated: {
type: Date,
required: true
}