@kipicore/dbcore 1.1.485 → 1.1.486

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,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('institutes');
4
+ if (!table.partners_ids) {
5
+ await queryInterface.addColumn('institutes', 'partners_ids', {
6
+ type: Sequelize.ARRAY(Sequelize.STRING),
7
+ field: 'partners_ids',
8
+ defaultValue: [],
9
+ allowNull: true,
10
+ });
11
+ }
12
+ };
13
+ const down = async (queryInterface) => {
14
+ const table = await queryInterface.describeTable('institutes');
15
+ if (table.partners_ids) {
16
+ await queryInterface.removeColumn('institutes', 'partners_ids');
17
+ }
18
+ };
19
+ module.exports = {
20
+ up,
21
+ down,
22
+ };
@@ -40,4 +40,5 @@ export interface IInstituteAttributes extends IDefaultAttributes {
40
40
  emailVerification?: EMAIL_VERIFICATION;
41
41
  mobileVerification?: MOBILE_VERIFICATION;
42
42
  trialPlanCount: number;
43
+ partnersIds?: string[];
43
44
  }
@@ -41,6 +41,7 @@ declare class InstituteModel extends Model<IInstituteAttributes, TInstituteCreat
41
41
  otp?: string;
42
42
  emailVerification?: EMAIL_VERIFICATION;
43
43
  mobileVerification?: MOBILE_VERIFICATION;
44
+ partnersIds?: string[];
44
45
  createdBy: string;
45
46
  updatedBy: string;
46
47
  deletedBy: string;
@@ -142,6 +142,12 @@ InstituteModel.init({
142
142
  defaultValue: 0,
143
143
  allowNull: false,
144
144
  },
145
+ partnersIds: {
146
+ type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.STRING),
147
+ defaultValue: [],
148
+ allowNull: true,
149
+ field: 'partners_ids',
150
+ },
145
151
  }, {
146
152
  modelName: 'InstituteModel',
147
153
  tableName: 'institutes',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.485",
3
+ "version": "1.1.486",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",