whitelabel-db 1.1.78 → 1.1.79
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,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.down = exports.up = void 0;
|
|
13
|
+
// Purpose: Add video column to static_hotels table.
|
|
14
|
+
const sequelize_1 = require("sequelize");
|
|
15
|
+
const up = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
try {
|
|
17
|
+
// Add all columns in parallel
|
|
18
|
+
yield queryInterface.addColumn('projects', 'seo', {
|
|
19
|
+
type: sequelize_1.DataTypes.JSONB,
|
|
20
|
+
allowNull: false,
|
|
21
|
+
defaultValue: {},
|
|
22
|
+
});
|
|
23
|
+
console.log('column added successfully.');
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.error('Error while adding columns:', error.message);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
exports.up = up;
|
|
30
|
+
const down = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
try {
|
|
32
|
+
// Remove columns
|
|
33
|
+
yield queryInterface.removeColumn('projects', 'seo');
|
|
34
|
+
console.log('column removed successfully.');
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.error('Error while removing columns:', error.message);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
exports.down = down;
|
package/dist/models/Project.d.ts
CHANGED
package/dist/models/Project.js
CHANGED
|
@@ -105,6 +105,14 @@ __decorate([
|
|
|
105
105
|
}),
|
|
106
106
|
__metadata("design:type", Object)
|
|
107
107
|
], Project.prototype, "settings", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, sequelize_typescript_1.Column)({
|
|
110
|
+
type: sequelize_typescript_1.DataType.JSONB,
|
|
111
|
+
allowNull: false,
|
|
112
|
+
defaultValue: {},
|
|
113
|
+
}),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], Project.prototype, "seo", void 0);
|
|
108
116
|
__decorate([
|
|
109
117
|
(0, sequelize_typescript_1.ForeignKey)(() => Agency_1.Agency),
|
|
110
118
|
sequelize_typescript_1.Index,
|