whitelabel-db 1.1.91 → 1.1.92
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 isActive column to projects table with default value true
|
|
14
|
+
const sequelize_1 = require("sequelize");
|
|
15
|
+
const up = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
try {
|
|
17
|
+
yield queryInterface.addColumn('projects', 'isActive', {
|
|
18
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
19
|
+
allowNull: true,
|
|
20
|
+
defaultValue: true,
|
|
21
|
+
});
|
|
22
|
+
console.log('isActive column added to projects table successfully.');
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.error('Error while adding isActive column:', error.message);
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
exports.up = up;
|
|
30
|
+
const down = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
try {
|
|
32
|
+
yield queryInterface.removeColumn('projects', 'isActive');
|
|
33
|
+
console.log('isActive column removed from projects table successfully.');
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.error('Error while removing isActive column:', error.message);
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
exports.down = down;
|
package/dist/models/Project.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class Project extends Model<Partial<Project>> {
|
|
|
16
16
|
bookings?: Booking[];
|
|
17
17
|
preferences?: object;
|
|
18
18
|
appearance?: object;
|
|
19
|
+
isActive?: boolean;
|
|
19
20
|
generateSession(secret: string): string;
|
|
20
21
|
getLiteApiClient(): LiteApiClient;
|
|
21
22
|
getLiteApiClientV3(): LiteApiClientV3;
|
package/dist/models/Project.js
CHANGED
|
@@ -153,6 +153,13 @@ __decorate([
|
|
|
153
153
|
}),
|
|
154
154
|
__metadata("design:type", Object)
|
|
155
155
|
], Project.prototype, "appearance", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, sequelize_typescript_1.Column)({
|
|
158
|
+
type: sequelize_typescript_1.DataType.BOOLEAN,
|
|
159
|
+
defaultValue: true,
|
|
160
|
+
}),
|
|
161
|
+
__metadata("design:type", Boolean)
|
|
162
|
+
], Project.prototype, "isActive", void 0);
|
|
156
163
|
exports.Project = Project = __decorate([
|
|
157
164
|
(0, sequelize_typescript_1.Table)({
|
|
158
165
|
tableName: 'projects',
|