agrs-sequelize-sdk 1.2.44 → 1.2.46

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.
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ module.exports = {
4
+ up: async (queryInterface, Sequelize) => {
5
+ await queryInterface.addColumn("articles", "requestedFromDashboard", {
6
+ type: Sequelize.BOOLEAN,
7
+ allowNull: false,
8
+ defaultValue: false,
9
+ comment:
10
+ "Indicates if the article was created through our dashboard (true) or imported from external sources (false)",
11
+ });
12
+ },
13
+
14
+ down: async (queryInterface, Sequelize) => {
15
+ await queryInterface.removeColumn("articles", "requestedFromDashboard");
16
+ },
17
+ };
package/models/Article.js CHANGED
@@ -12,6 +12,13 @@ module.exports = (sequelize, DataTypes) => {
12
12
  allowNull: true,
13
13
  comment: "ID of the keyword from Predicto keywords API",
14
14
  },
15
+ requestedFromDashboard: {
16
+ type: DataTypes.BOOLEAN,
17
+ allowNull: false,
18
+ defaultValue: false,
19
+ comment:
20
+ "Indicates if the article was created through our dashboard (true) or imported from external sources (false)",
21
+ },
15
22
  category: {
16
23
  type: DataTypes.STRING,
17
24
  allowNull: true,
@@ -92,23 +99,6 @@ module.exports = (sequelize, DataTypes) => {
92
99
  type: DataTypes.STRING,
93
100
  allowNull: false,
94
101
  defaultValue: "pending",
95
- validate: {
96
- isIn: [
97
- [
98
- "pending",
99
- "approved",
100
- "processing",
101
- "rejected",
102
- "disapproved",
103
- "duplicated",
104
- "keyword_already_exists",
105
- "invalid_vertical",
106
- "invalid_language",
107
- "in_review",
108
- "error",
109
- ],
110
- ],
111
- },
112
102
  },
113
103
  originalStatus: {
114
104
  type: DataTypes.STRING,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.2.44",
3
+ "version": "1.2.46",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",