@kipicore/dbcore 1.1.175 → 1.1.177
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/constants/errorMessages.d.ts +2 -1
- package/dist/constants/errorMessages.js +1 -0
- package/dist/db/psql/migrations/20251213105516-add_taluka_in_user.js +1 -1
- package/dist/db/psql/migrations/20251225065859-update_ins_in_taluka.d.ts +2 -0
- package/dist/db/psql/migrations/20251225065859-update_ins_in_taluka.js +30 -0
- package/package.json +1 -1
|
@@ -1239,5 +1239,6 @@ export declare enum STUDENT_LEAVE_REQUEST_ERROR_MESSAGES {
|
|
|
1239
1239
|
GET_FAIL = "Unable to retrieve data",
|
|
1240
1240
|
UPDATE_FAIL = "Unable to update leave request",
|
|
1241
1241
|
DELETE_FAIL = "Unable to delete leave",
|
|
1242
|
-
NOT_FOUND = "Unable to find leave request"
|
|
1242
|
+
NOT_FOUND = "Unable to find leave request",
|
|
1243
|
+
DATE_PASSED = "Leave requested date is passed!"
|
|
1243
1244
|
}
|
|
@@ -1376,4 +1376,5 @@ var STUDENT_LEAVE_REQUEST_ERROR_MESSAGES;
|
|
|
1376
1376
|
STUDENT_LEAVE_REQUEST_ERROR_MESSAGES["UPDATE_FAIL"] = "Unable to update leave request";
|
|
1377
1377
|
STUDENT_LEAVE_REQUEST_ERROR_MESSAGES["DELETE_FAIL"] = "Unable to delete leave";
|
|
1378
1378
|
STUDENT_LEAVE_REQUEST_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find leave request";
|
|
1379
|
+
STUDENT_LEAVE_REQUEST_ERROR_MESSAGES["DATE_PASSED"] = "Leave requested date is passed!";
|
|
1379
1380
|
})(STUDENT_LEAVE_REQUEST_ERROR_MESSAGES || (exports.STUDENT_LEAVE_REQUEST_ERROR_MESSAGES = STUDENT_LEAVE_REQUEST_ERROR_MESSAGES = {}));
|
|
@@ -12,7 +12,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
12
12
|
}
|
|
13
13
|
if (!institutesTable.taluka) {
|
|
14
14
|
await queryInterface.addColumn('institutes', 'taluka', {
|
|
15
|
-
type: Sequelize.
|
|
15
|
+
type: Sequelize.STRING,
|
|
16
16
|
defaultValue: null,
|
|
17
17
|
allowNull: true,
|
|
18
18
|
field: 'taluka',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('institutes');
|
|
4
|
+
// Case 1: taluka column does NOT exist → add as STRING
|
|
5
|
+
if (!table.taluka) {
|
|
6
|
+
await queryInterface.addColumn('institutes', 'taluka', {
|
|
7
|
+
type: Sequelize.STRING,
|
|
8
|
+
allowNull: true,
|
|
9
|
+
defaultValue: null,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
// Case 2: taluka exists AND type is UUID → change to STRING
|
|
13
|
+
else if (table.taluka.type &&
|
|
14
|
+
table.taluka.type.toLowerCase().includes('uuid')) {
|
|
15
|
+
await queryInterface.changeColumn('institutes', 'taluka', {
|
|
16
|
+
type: Sequelize.STRING,
|
|
17
|
+
allowNull: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const down = async (queryInterface, Sequelize) => {
|
|
22
|
+
const table = await queryInterface.describeTable('institutes');
|
|
23
|
+
if (table.taluka) {
|
|
24
|
+
await queryInterface.removeColumn('institutes', 'taluka');
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
module.exports = {
|
|
28
|
+
up,
|
|
29
|
+
down,
|
|
30
|
+
};
|
package/package.json
CHANGED