-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added GET /logs/{logId}/tags endpoint
- Loading branch information
Showing
10 changed files
with
264 additions
and
31 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
lib/database/migrations/20200511132541-log-tags-relation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* @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. | ||
*/ | ||
|
||
module.exports = { | ||
up: (queryInterface, _Sequelize) => queryInterface.sequelize.transaction((t) => Promise.all([ | ||
queryInterface.addConstraint('log_tags', { | ||
fields: ['log_id'], | ||
type: 'foreign key', | ||
name: 'fk_log_id_log_tags', | ||
references: { | ||
table: 'logs', | ||
field: 'id', | ||
}, | ||
}, { transaction: t }), | ||
queryInterface.addConstraint('log_tags', { | ||
fields: ['tag_id'], | ||
type: 'foreign key', | ||
name: 'fk_tag_id_log_tags', | ||
references: { | ||
table: 'tags', | ||
field: 'id', | ||
}, | ||
}, { transaction: t }), | ||
])), | ||
|
||
down: (queryInterface, _Sequelize) => queryInterface.sequelize.transaction((t) => Promise.all([ | ||
queryInterface.removeConstraint('log_tags', 'fk_log_id_log_tags', { transaction: t }), | ||
queryInterface.removeConstraint('log_tags', 'fk_tag_id_log_tags', { transaction: t }), | ||
])), | ||
}; |
40 changes: 40 additions & 0 deletions
40
lib/database/migrations/20200511132542-log-runs-relation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* @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. | ||
*/ | ||
|
||
module.exports = { | ||
up: (queryInterface, _Sequelize) => queryInterface.sequelize.transaction((t) => Promise.all([ | ||
queryInterface.addConstraint('log_runs', { | ||
fields: ['log_id'], | ||
type: 'foreign key', | ||
name: 'fk_log_id_log_runs', | ||
references: { | ||
table: 'logs', | ||
field: 'id', | ||
}, | ||
}, { transaction: t }), | ||
queryInterface.addConstraint('log_runs', { | ||
fields: ['run_id'], | ||
type: 'foreign key', | ||
name: 'fk_run_id_log_runs', | ||
references: { | ||
table: 'runs', | ||
field: 'id', | ||
}, | ||
}, { transaction: t }), | ||
])), | ||
|
||
down: (queryInterface, _Sequelize) => queryInterface.sequelize.transaction((t) => Promise.all([ | ||
queryInterface.removeConstraint('log_runs', 'fk_log_id_log_runs', { transaction: t }), | ||
queryInterface.removeConstraint('log_runs', 'fk_run_id_log_runs', { transaction: t }), | ||
])), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.