@itleanchatbot/shared-models-js-postgres 2.8.32 → 2.8.33

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.8.32",
3
+ "version": "2.8.33",
4
4
  "description": "Shared Models JS Postgres",
5
5
  "main": "index.js",
6
6
  "license": "ISC",
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up (queryInterface, Sequelize) {
5
+
6
+ await queryInterface.addColumn('Skills', 'status', {
7
+ defaultValue: 'ready',
8
+ allowNull: false,
9
+ type: Sequelize.STRING(10),
10
+ validate: {
11
+ notEmpty: true,
12
+ },
13
+ })
14
+
15
+ await queryInterface.addColumn('Skills', 'error', {
16
+ allowNull: true,
17
+ type: Sequelize.TEXT
18
+ })
19
+ },
20
+
21
+ async down (queryInterface) {
22
+ await queryInterface.removeColumn('Skills', 'error')
23
+ await queryInterface.removeColumn('Skills', 'status')
24
+ }
25
+ };
@@ -87,6 +87,18 @@ const SkillModel = (sequelize, types) => {
87
87
  allowNull: true,
88
88
  type: types.DATE,
89
89
  defaultValue: null
90
+ },
91
+ status: {
92
+ defaultValue: 'ready',
93
+ allowNull: false,
94
+ type: types.STRING(10),
95
+ validate: {
96
+ notEmpty: true,
97
+ },
98
+ },
99
+ error: {
100
+ allowNull: true,
101
+ type: types.TEXT
90
102
  }
91
103
  })
92
104