whitelabel-db 1.1.77 → 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.
- package/dist/migrations/010-add-user-resetToken.js +0 -16
- package/dist/migrations/011-add-project-resceotToke.d.ts +3 -0
- package/dist/migrations/011-add-project-resceotToke.js +40 -0
- package/dist/models/Project.d.ts +1 -0
- package/dist/models/Project.js +8 -0
- package/dist/models/User.js +0 -1
- package/package.json +1 -1
|
@@ -24,17 +24,6 @@ const up = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
24
24
|
allowNull: true,
|
|
25
25
|
});
|
|
26
26
|
console.log('All columns added successfully.');
|
|
27
|
-
// Add index
|
|
28
|
-
yield queryInterface.addIndex('users', {
|
|
29
|
-
fields: ['passwordResetToken'],
|
|
30
|
-
name: 'users_password_reset_token',
|
|
31
|
-
});
|
|
32
|
-
// Add index
|
|
33
|
-
yield queryInterface.addIndex('users', {
|
|
34
|
-
fields: ['passwordResetTokenExpiresAt'],
|
|
35
|
-
name: 'users_password_reset_token_expires_at',
|
|
36
|
-
});
|
|
37
|
-
console.log('All indexes added successfully.');
|
|
38
27
|
}
|
|
39
28
|
catch (error) {
|
|
40
29
|
console.error('Error while adding columns:', error.message);
|
|
@@ -47,11 +36,6 @@ const down = (queryInterface) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
47
36
|
yield queryInterface.removeColumn('users', 'passwordResetToken');
|
|
48
37
|
yield queryInterface.removeColumn('users', 'passwordResetTokenExpiresAt');
|
|
49
38
|
console.log('All columns removed successfully.');
|
|
50
|
-
// Remove index
|
|
51
|
-
yield queryInterface.removeIndex('users', 'users_password_reset_token');
|
|
52
|
-
// Remove index
|
|
53
|
-
yield queryInterface.removeIndex('users', 'users_password_reset_token_expires_at');
|
|
54
|
-
console.log('All indexes removed successfully.');
|
|
55
39
|
}
|
|
56
40
|
catch (error) {
|
|
57
41
|
console.error('Error while removing columns:', error.message);
|
|
@@ -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,
|
package/dist/models/User.js
CHANGED
|
@@ -129,7 +129,6 @@ __decorate([
|
|
|
129
129
|
__metadata("design:type", Boolean)
|
|
130
130
|
], User.prototype, "isVerified", void 0);
|
|
131
131
|
__decorate([
|
|
132
|
-
sequelize_typescript_1.Index,
|
|
133
132
|
(0, sequelize_typescript_1.Column)({
|
|
134
133
|
type: sequelize_typescript_1.DataType.STRING,
|
|
135
134
|
allowNull: true,
|