Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move migrations in sub-directories #1758

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class SequelizeDatabase {
getUmzug(migrationsDirectory, storage) {
return new Umzug({
migrations: {
glob: `${migrationsDirectory}/*.js`,
glob: `${migrationsDirectory}/**/*.js`,
resolve: ({ name, path: migrationPath, context }) => {
const migration = require(migrationPath || '');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

'use strict';

const { RUN_DEFINITIONS } = require('../../domain/enums/RunDefinition.js');
const { RUN_DEFINITIONS } = require('../../../../domain/enums/RunDefinition.js');

const SET_PHYSICS_DEFINITION = `
UPDATE runs r
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const { RUN_CALIBRATION_STATUS, RunCalibrationStatus } = require('../../domain/enums/RunCalibrationStatus.js');
const { RunDefinition } = require('../../domain/enums/RunDefinition.js');
const { RUN_CALIBRATION_STATUS, RunCalibrationStatus } = require('../../../../domain/enums/RunCalibrationStatus.js');
const { RunDefinition } = require('../../../../domain/enums/RunDefinition.js');

const UPDATE_CALIBRATION_STATUS = `UPDATE runs
SET calibration_status = '${RunCalibrationStatus.NO_STATUS}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { RunDefinition } = require('../../domain/enums/RunDefinition.js');
const { RunDefinition } = require('../../../../domain/enums/RunDefinition.js');

const REMOVE_DATA_PASSES_LINKS_TO_NON_PHYSICS_RUNS = `
DELETE dpr FROM data_passes_runs AS dpr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

const { timestampToMysql } = require('../../server/utilities/timestampToMysql');
const { timestampToMysql } = require('../../../../server/utilities/timestampToMysql.js');

/**
* Remove time segments of effective periods of flags assigned to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

'use strict';

const { Sequelize } = require('sequelize');
const { DetectorType, DETECTOR_TYPES } = require('../../domain/enums/DetectorTypes');
const { DetectorType, DETECTOR_TYPES } = require('../../../../domain/enums/DetectorTypes.js');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

'use strict';

const { Sequelize } = require('sequelize');
const { DetectorType, DATA_TAKING_DETECTOR_TYPES } = require('../../domain/enums/DetectorTypes');
const { DetectorType, DATA_TAKING_DETECTOR_TYPES } = require('../../../../domain/enums/DetectorTypes.js');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

'use strict';

const {
DEFAULT_GAQ_DETECTORS_FOR_PROTON_PROTON_RUNS,
DEFAULT_GAQ_DETECTORS_FOR_LEAD_LEAD_RUNS,
} = require('../../server/services/gaq/GaqDetectorsService');
} = require('../../../../server/services/gaq/GaqDetectorsService.js');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

'use strict';

const { Sequelize } = require('sequelize');
const { DATA_PASS_VERSION_STATUSES, DataPassVersionStatus } = require('../../domain/enums/DataPassVersionStatus');
const { DATA_PASS_VERSION_STATUSES, DataPassVersionStatus } = require('../../../../domain/enums/DataPassVersionStatus.js');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
* @license
* Copyright CERN and copyright holders of ALICE O2. This software is
* distributed under the terms of the GNU General Public License v3 (GPL
* Version 3), copied verbatim in the file "COPYING".
*
* See http://alice-o2.web.cern.ch/license for full licensing information.
* See http://alice-o2.web.cern.ch/license for full licensing information.
*
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
* In applying this license CERN does not waive the privileges and immunities
* granted to it by virtue of its status as an Intergovernmental Organization
* or submit itself to any jurisdiction.
*/

'use strict';

const { Sequelize } = require('sequelize');
const { SKIMMING_STAGES, SkimmingStage } = require('../../domain/enums/SkimmingStage');
const { SKIMMING_STAGES, SkimmingStage } = require('../../../../domain/enums/SkimmingStage.js');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
Expand Down
Empty file.