@itleanchatbot/shared-models-js-postgres 2.7.5 → 2.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itleanchatbot/shared-models-js-postgres",
3
- "version": "2.7.5",
3
+ "version": "2.7.7",
4
4
  "description": "Shared Models JS Postgres",
5
5
  "main": "index.js",
6
6
  "license": "ISC",
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up (queryInterface, Sequelize) {
5
+ await queryInterface.addColumn('Sessions', 'startedSessionAt', {
6
+ type: Sequelize.DATE,
7
+ allowNull: true
8
+ })
9
+ },
10
+
11
+ async down (queryInterface) {
12
+ await queryInterface.removeColumn('Sessions', 'startedSessionAt')
13
+ }
14
+ };
@@ -90,27 +90,27 @@ exports.model = (sequelize, DataType) => {
90
90
  },
91
91
  processedAt: {
92
92
  allowNull: true,
93
- type: DataTypes.DATE
93
+ type: DataType.DATE
94
94
  },
95
95
  enqueuedAt: {
96
96
  allowNull: true,
97
- type: DataTypes.DATE
97
+ type: DataType.DATE
98
98
  },
99
99
  failedAt: {
100
100
  allowNull: true,
101
- type: DataTypes.DATE
101
+ type: DataType.DATE
102
102
  },
103
103
  readAt: {
104
104
  allowNull: true,
105
- type: DataTypes.DATE
105
+ type: DataType.DATE
106
106
  },
107
107
  sentAt: {
108
108
  allowNull: true,
109
- type: DataTypes.DATE
109
+ type: DataType.DATE
110
110
  },
111
111
  deliveredAt: {
112
112
  allowNull: true,
113
- type: DataTypes.DATE
113
+ type: DataType.DATE
114
114
  },
115
115
  brokerMessageStatus: {
116
116
  type: DataType.STRING(100),
@@ -119,7 +119,7 @@ exports.model = (sequelize, DataType) => {
119
119
  brokerMessageId: {
120
120
  type: DataType.UUID,
121
121
  allowNull: true
122
- }
122
+ },
123
123
  })
124
124
 
125
125
  BotIterables.associate = (models) => {
@@ -51,6 +51,10 @@ exports.model = (sequelize, DataTypes) => {
51
51
  type: DataTypes.BOOLEAN,
52
52
  defaultValue: false,
53
53
  allowNull: true,
54
+ },
55
+ startedSessionAt: {
56
+ allowNull: true,
57
+ type: DataTypes.DATE
54
58
  }
55
59
  })
56
60