Skip to content

Commit 7a83ee3

Browse files
author
Nino van Galen
committed
feat: Added epn role model and migration
1 parent 56c2608 commit 7a83ee3

2 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
module.exports = {
15+
up: (queryInterface, Sequelize) => queryInterface.createTable('EpnRoleSessions', {
16+
id: {
17+
allowNull: false,
18+
autoIncrement: true,
19+
primaryKey: true,
20+
type: Sequelize.INTEGER,
21+
},
22+
name: {
23+
type: Sequelize.STRING,
24+
},
25+
session_number: {
26+
type: Sequelize.INTEGER,
27+
},
28+
epn_hostname: {
29+
type: Sequelize.STRING,
30+
},
31+
n_subtimeframes: {
32+
type: Sequelize.INTEGER,
33+
},
34+
bytes_in: {
35+
type: Sequelize.INTEGER,
36+
},
37+
bytes_out: {
38+
type: Sequelize.INTEGER,
39+
},
40+
session_start: {
41+
type: Sequelize.DATE,
42+
},
43+
session_end: {
44+
type: Sequelize.DATE,
45+
},
46+
created_at: {
47+
allowNull: false,
48+
type: Sequelize.DATE,
49+
},
50+
updated_at: {
51+
allowNull: false,
52+
type: Sequelize.DATE,
53+
},
54+
}),
55+
56+
down: (queryInterface, _Sequelize) => queryInterface.dropTable('EpnRoleSessions'),
57+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
module.exports = (sequelize, Sequelize) => {
15+
const EpnRoleSession = sequelize.define('EpnRoleSession', {
16+
name: Sequelize.STRING,
17+
sessionNumber: Sequelize.INTEGER,
18+
epnHostname: Sequelize.STRING,
19+
nSubtimeframes: Sequelize.INTEGER,
20+
bytesIn: Sequelize.INTEGER,
21+
bytesOut: Sequelize.INTEGER,
22+
sessionStart: Sequelize.DATE,
23+
sessionEnd: Sequelize.DATE,
24+
}, {});
25+
26+
return EpnRoleSession;
27+
};

0 commit comments

Comments
 (0)