File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ( 'Users' , {
16+ id : {
17+ allowNull : false ,
18+ autoIncrement : true ,
19+ primaryKey : true ,
20+ type : Sequelize . INTEGER ,
21+ } ,
22+ external_id : {
23+ allowNull : false ,
24+ type : Sequelize . INTEGER ,
25+ } ,
26+ token : {
27+ type : Sequelize . STRING ,
28+ } ,
29+ token_valid_until : {
30+ type : Sequelize . DATE ,
31+ } ,
32+ created_at : {
33+ allowNull : false ,
34+ type : Sequelize . DATE ,
35+ } ,
36+ updated_at : {
37+ allowNull : false ,
38+ type : Sequelize . DATE ,
39+ } ,
40+ } ) ,
41+ down : ( queryInterface , _Sequelize ) => queryInterface . dropTable ( 'Users' ) ,
42+ } ;
Original file line number Diff line number Diff line change 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 User = sequelize . define ( 'User' , {
16+ id : Sequelize . INTEGER ,
17+ externalId : Sequelize . INTEGER ,
18+ token : Sequelize . STRING ,
19+ tokenValidUntil : Sequelize . DATE ,
20+ } , { } ) ;
21+ return User ;
22+ } ;
You can’t perform that action at this time.
0 commit comments