whitelabel-db 1.1.78 → 1.1.80
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/011-add-project-resceotToke.d.ts +3 -0
- package/dist/migrations/011-add-project-resceotToke.js +40 -0
- package/dist/migrations/012-add-otp-expire.d.ts +3 -0
- package/dist/migrations/012-add-otp-expire.js +44 -0
- package/dist/models/Booking.d.ts +1 -0
- package/dist/models/Booking.js +7 -0
- package/dist/models/Project.d.ts +1 -0
- package/dist/models/Project.js +8 -0
- package/dist/models/User.d.ts +1 -0
- package/dist/models/User.js +7 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -0,0 +1,44 @@
|
|
|
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('users', 'otpExpiresAt', {
|
|
19
|
+
type: sequelize_1.DataTypes.DATE,
|
|
20
|
+
allowNull: true,
|
|
21
|
+
});
|
|
22
|
+
yield queryInterface.addColumn('bookings', 'otpExpiresAt', {
|
|
23
|
+
type: sequelize_1.DataTypes.DATE,
|
|
24
|
+
allowNull: true,
|
|
25
|
+
});
|
|
26
|
+
console.log('column added successfully.');
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
console.error('Error while adding columns:', error.message);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
exports.up = up;
|
|
33
|
+
const down = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
// Remove columns
|
|
36
|
+
yield queryInterface.removeColumn('users', 'otpExpiresAt');
|
|
37
|
+
yield queryInterface.removeColumn('bookings', 'otpExpiresAt');
|
|
38
|
+
console.log('column removed successfully.');
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
console.error('Error while removing columns:', error.message);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
exports.down = down;
|
package/dist/models/Booking.d.ts
CHANGED
package/dist/models/Booking.js
CHANGED
|
@@ -140,6 +140,13 @@ __decorate([
|
|
|
140
140
|
}),
|
|
141
141
|
__metadata("design:type", String)
|
|
142
142
|
], Booking.prototype, "otp", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, sequelize_typescript_1.Column)({
|
|
145
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
146
|
+
allowNull: true,
|
|
147
|
+
}),
|
|
148
|
+
__metadata("design:type", Date)
|
|
149
|
+
], Booking.prototype, "otpExpiresAt", void 0);
|
|
143
150
|
__decorate([
|
|
144
151
|
sequelize_typescript_1.Index,
|
|
145
152
|
(0, sequelize_typescript_1.Column)({
|
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.d.ts
CHANGED
package/dist/models/User.js
CHANGED
|
@@ -117,6 +117,13 @@ __decorate([
|
|
|
117
117
|
}),
|
|
118
118
|
__metadata("design:type", String)
|
|
119
119
|
], User.prototype, "otp", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, sequelize_typescript_1.Column)({
|
|
122
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
123
|
+
allowNull: true,
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", Date)
|
|
126
|
+
], User.prototype, "otpExpiresAt", void 0);
|
|
120
127
|
__decorate([
|
|
121
128
|
(0, sequelize_typescript_1.BelongsTo)(() => Role_1.Role),
|
|
122
129
|
__metadata("design:type", Role_1.Role)
|