From 3fff500b8f0eb21559e8654f9326851d14394f1b Mon Sep 17 00:00:00 2001 From: antoineludeau <52679050+antoineludeau@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:03:30 +0200 Subject: [PATCH 1/2] Modified JobStatus sequelize schema --- lib/util/sequelize.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/util/sequelize.js b/lib/util/sequelize.js index 28283f8a..a81cf9e9 100644 --- a/lib/util/sequelize.js +++ b/lib/util/sequelize.js @@ -124,6 +124,14 @@ export const JobStatus = sequelize.define('JobStatus', { type: DataTypes.STRING, allowNull: true, }, + dataType: { + type: DataTypes.STRING, + allowNull: true, + }, + jobType: { + type: DataTypes.STRING, + allowNull: true, + }, count: { type: DataTypes.INTEGER, allowNull: true, From fd54422d26f403692d3831860bbe6afe7cc264ad Mon Sep 17 00:00:00 2001 From: antoineludeau <52679050+antoineludeau@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:03:55 +0200 Subject: [PATCH 2/2] Added migration to add columns to job statuses table --- ...0822124246-add-columns-to-job-statuses.cjs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 db-migrations/migrations/20230822124246-add-columns-to-job-statuses.cjs diff --git a/db-migrations/migrations/20230822124246-add-columns-to-job-statuses.cjs b/db-migrations/migrations/20230822124246-add-columns-to-job-statuses.cjs new file mode 100644 index 00000000..62f2d7e8 --- /dev/null +++ b/db-migrations/migrations/20230822124246-add-columns-to-job-statuses.cjs @@ -0,0 +1,20 @@ +'use strict' + +module.exports = { + async up(queryInterface, Sequelize) { + await queryInterface.addColumn('JobStatuses', 'dataType', { + type: Sequelize.STRING, + allowNull: true, + }) + + await queryInterface.addColumn('JobStatuses', 'jobType', { + type: Sequelize.STRING, + allowNull: true, + }) + }, + + async down(queryInterface) { + await queryInterface.removeColumn('JobStatuses', 'dataType') + await queryInterface.removeColumn('JobStatuses', 'jobType') + }, +}