Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
David Domenech 2024-02-22 05:59:00 +00:00
commit e4d60d20c5
4 changed files with 15 additions and 5 deletions

View File

@ -22,7 +22,7 @@ module.exports = Self => {
const {url} = await Self.app.models.Url.findOne({
where: {
appName,
enviroment: process.env.NODE_ENV || 'development'
environment: process.env.NODE_ENV || 'development'
}
});
return url;

View File

@ -22,6 +22,7 @@ BEGIN
SET v2Years = util.VN_CURDATE() - INTERVAL 2 YEAR;
SET v5Years = util.VN_CURDATE() - INTERVAL 5 YEAR;
DELETE FROM workerActivity WHERE created < v2Years;
DELETE FROM ticketParking WHERE created < vDateShort;
DELETE FROM routesMonitor WHERE dated < vDateShort;
DELETE FROM workerTimeControlLog WHERE created < vDateShort;

View File

@ -81,10 +81,6 @@ ALTER TABLE IF EXISTS vn2008.MovimienRENAMEs_avisar__ COMMENT='refs #6371 deprec
ALTER TABLE IF EXISTS vn2008.MovimienRENAMEs_revisar RENAME vn2008.MovimienRENAMEs_revisar__;
ALTER TABLE IF EXISTS vn2008.MovimienRENAMEs_revisar__ COMMENT='refs #6371 deprecated 2024-01-11';
-- Para la tabla Proveedores_cargueras
ALTER TABLE IF EXISTS vn2008.Proveedores_cargueras RENAME vn2008.Proveedores_cargueras__;
ALTER TABLE IF EXISTS vn2008.Proveedores_cargueras__ COMMENT='refs #6371 deprecated 2024-01-11';
-- Para la tabla Proveedores_comunicados
ALTER TABLE IF EXISTS vn2008.Proveedores_comunicados RENAME vn2008.Proveedores_comunicados__;
ALTER TABLE IF EXISTS vn2008.Proveedores_comunicados__ COMMENT='refs #6371 deprecated 2024-01-11';

View File

@ -0,0 +1,13 @@
-- Place your SQL code here
CREATE TABLE vn.workerActivity (
id INT PRIMARY KEY AUTO_INCREMENT,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
model ENUM('COM', 'ENT', 'TPV', 'ENC', 'LAB', 'ETI') NOT NULL,
workerFk INT(10) UNSIGNED NOT NULL,
event ENUM('open', 'close', 'insert', 'delete', 'update', 'refresh') NOT NULL,
description VARCHAR(255) DEFAULT NULL,
CONSTRAINT fk_workerActivity_worker FOREIGN KEY (workerFk)
REFERENCES vn.worker (id)
ON DELETE CASCADE
ON UPDATE CASCADE
);