@kipicore/dbcore 1.1.183 → 1.1.184
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/db/psql/migrations/20251231124237-add-field_to_maintenance.d.ts +2 -0
- package/dist/db/psql/migrations/20251231124237-add-field_to_maintenance.js +22 -0
- package/dist/interfaces/maintenanceInterface.d.ts +1 -0
- package/dist/interfaces/userDetailsInterface.d.ts +2 -0
- package/dist/models/mongodb/userDetailsModel.js +6 -0
- package/dist/models/psql/maintenanceModel.d.ts +1 -0
- package/dist/models/psql/maintenanceModel.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('maintenance');
|
|
4
|
+
if (!table.is_remove) {
|
|
5
|
+
await queryInterface.addColumn('maintenance', 'is_remove', {
|
|
6
|
+
type: Sequelize.BOOLEAN,
|
|
7
|
+
defaultValue: null,
|
|
8
|
+
allowNull: true,
|
|
9
|
+
field: 'is_remove',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const down = async (queryInterface, Sequelize) => {
|
|
14
|
+
const table = await queryInterface.describeTable('maintenance');
|
|
15
|
+
if (table.is_remove) {
|
|
16
|
+
await queryInterface.removeColumn('maintenance', 'is_remove');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
module.exports = {
|
|
20
|
+
up,
|
|
21
|
+
down,
|
|
22
|
+
};
|
|
@@ -109,6 +109,11 @@ MaintenanceModel.init({
|
|
|
109
109
|
type: sequelize_1.DataTypes.STRING,
|
|
110
110
|
field: 'app_type',
|
|
111
111
|
allowNull: true,
|
|
112
|
+
},
|
|
113
|
+
isRemove: {
|
|
114
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
115
|
+
field: 'is_remove',
|
|
116
|
+
allowNull: true,
|
|
112
117
|
}
|
|
113
118
|
}, {
|
|
114
119
|
modelName: 'MaintenanceModel',
|
package/package.json
CHANGED