Skip to content

Commit b39541c

Browse files
authored
[OGUI-1449] Use BIGINT for reconstructedEventsCount (#1910)
* `reconstructedEventsCount` is expected to be up to a value of 1e13, thus BIGINT definition is needed in SQL.
1 parent f0b61c7 commit b39541c

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @license
3+
* Copyright CERN and copyright holders of ALICE O2. This software is
4+
* distributed under the terms of the GNU General Public License v3 (GPL
5+
* Version 3), copied verbatim in the file "COPYING".
6+
*
7+
* See http://alice-o2.web.cern.ch/license for full licensing information.
8+
*
9+
* In applying this license CERN does not waive the privileges and immunities
10+
* granted to it by virtue of its status as an Intergovernmental Organization
11+
* or submit itself to any jurisdiction.
12+
*/
13+
14+
'use strict';
15+
16+
/** @type {import('sequelize-cli').Migration} */
17+
module.exports = {
18+
up: async (queryInterface, Sequelize) => await queryInterface.changeColumn('data_pass_versions', 'reconstructed_events_count', {
19+
type: Sequelize.BIGINT,
20+
}),
21+
22+
down: async (queryInterface, Sequelize) => await queryInterface.changeColumn('data_pass_versions', 'reconstructed_events_count', {
23+
type: Sequelize.INTEGER,
24+
}),
25+
};

lib/database/models/dataPassVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = (sequelize) => {
3232
type: Sequelize.BIGINT,
3333
},
3434
reconstructedEventsCount: {
35-
type: Sequelize.INTEGER,
35+
type: Sequelize.BIGINT,
3636
},
3737
lastSeen: {
3838
type: Sequelize.INTEGER,

lib/domain/entities/DataPassVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @property {number} dataPassId
1919
* @property {string} description
2020
* @property {number} outputSize
21-
* @property {number} reconstructedEventsCount
21+
* @property {number} reconstructedEventsCount - expected to be up to a value of 1e13, thus BIGINT definition is needed in SQL but not in JS
2222
* @property {number} lastSeen
2323
* @property {boolean} deletedFromMonAlisa
2424
*

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aliceo2/bookkeeping",
3-
"version": "1.9.3",
3+
"version": "1.9.4",
44
"author": "ALICEO2",
55
"scripts": {
66
"coverage": "nyc npm test && npm run coverage:report",

0 commit comments

Comments
 (0)