@kipicore/dbcore 1.1.211 → 1.1.213
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,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('coin_purchase_offers');
|
|
4
|
+
// Check if column already exists
|
|
5
|
+
if (!table.total_amount) {
|
|
6
|
+
await queryInterface.addColumn('coin_purchase_offers', 'total_amount', {
|
|
7
|
+
type: Sequelize.FLOAT,
|
|
8
|
+
defaultValue: 0,
|
|
9
|
+
allowNull: true,
|
|
10
|
+
field: 'total_amount',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
if (table.amount) {
|
|
14
|
+
await queryInterface.removeColumn('coin_purchase_offers', 'amount');
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const down = async (queryInterface, Sequelize) => {
|
|
18
|
+
const table = await queryInterface.describeTable('coin_purchase_offers');
|
|
19
|
+
// Remove only if column exists
|
|
20
|
+
if (!table.amount) {
|
|
21
|
+
await queryInterface.addColumn('coin_purchase_offers', 'amount', {
|
|
22
|
+
type: Sequelize.FLOAT,
|
|
23
|
+
defaultValue: 0,
|
|
24
|
+
allowNull: true,
|
|
25
|
+
field: 'amount',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (table.total_amount) {
|
|
29
|
+
await queryInterface.removeColumn('coin_purchase_offers', 'total_amount');
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
module.exports = {
|
|
33
|
+
up,
|
|
34
|
+
down,
|
|
35
|
+
};
|
|
@@ -43,6 +43,7 @@ export interface IInquiryModelAttributes extends IDefaultAttributes, Document {
|
|
|
43
43
|
instituteId: string;
|
|
44
44
|
basicInformation: IBasicInformation;
|
|
45
45
|
academicInformation: IAcademicInformation;
|
|
46
|
+
academicCalendarId: string;
|
|
46
47
|
guardianInformation: IGuardianInformation;
|
|
47
48
|
address?: IAddressSchema;
|
|
48
49
|
referredBy: INQUIRY_REFERRED_BY;
|
|
@@ -124,6 +124,7 @@ const InquirySchema = new mongoose_1.Schema({
|
|
|
124
124
|
guardianInformation: { type: GuardianInformationSchema, required: false, default: {} },
|
|
125
125
|
lastSchoolInformation: { type: LastSchoolSchema, required: false, default: {} },
|
|
126
126
|
address: { type: AddressSchema, required: false, default: {} },
|
|
127
|
+
academicCalendarId: { type: String, required: false },
|
|
127
128
|
referredBy: {
|
|
128
129
|
type: String,
|
|
129
130
|
enum: Object.values(app_1.INQUIRY_REFERRED_BY),
|
package/package.json
CHANGED