@kipicore/dbcore 1.1.268 → 1.1.270

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, Sequelize: any): Promise<void>;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('user_required_steps');
4
+ if (!table.institute_id) {
5
+ await queryInterface.addColumn('user_required_steps', 'institute_id', {
6
+ type: Sequelize.UUID,
7
+ allowNull: true,
8
+ field: 'institute_id',
9
+ });
10
+ }
11
+ };
12
+ const down = async (queryInterface, Sequelize) => {
13
+ const table = await queryInterface.describeTable('user_required_steps');
14
+ if (table.institute_id) {
15
+ await queryInterface.removeColumn('user_required_steps', 'institute_id');
16
+ }
17
+ };
18
+ module.exports = {
19
+ up,
20
+ down,
21
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('drivers');
4
+ if (!table.district) {
5
+ await queryInterface.addColumn('drivers', 'district', {
6
+ type: Sequelize.STRING,
7
+ allowNull: true,
8
+ });
9
+ }
10
+ };
11
+ const down = async (queryInterface, Sequelize) => {
12
+ const table = await queryInterface.describeTable('drivers');
13
+ if (table.district) {
14
+ await queryInterface.removeColumn('drivers', 'district');
15
+ }
16
+ };
17
+ module.exports = {
18
+ up,
19
+ down,
20
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('roles');
4
+ if (!table.master_id) {
5
+ await queryInterface.addColumn('roles', 'master_id', {
6
+ type: Sequelize.UUID,
7
+ allowNull: true,
8
+ });
9
+ }
10
+ };
11
+ const down = async (queryInterface, Sequelize) => {
12
+ const table = await queryInterface.describeTable('roles');
13
+ if (table.master_id) {
14
+ await queryInterface.removeColumn('roles', 'master_id');
15
+ }
16
+ };
17
+ module.exports = {
18
+ up,
19
+ down,
20
+ };
@@ -23,4 +23,5 @@ export interface IDriverModelAttributes extends IDefaultAttributes {
23
23
  drivingLicense: string;
24
24
  appType?: APP_TYPE;
25
25
  status: COMMAN_STATUS;
26
+ district?: string;
26
27
  }
@@ -18,6 +18,7 @@ export interface IRoleAttributes extends IDefaultAttributes {
18
18
  isInstituteDefault?: boolean;
19
19
  oldId?: string;
20
20
  academicCalendarId?: string;
21
+ masterId: string;
21
22
  }
22
23
  interface IRoleFeatureAction extends TModuleFeatureCreationAttributes {
23
24
  actions: TFeatureActionCreationAttributes[];
@@ -6,4 +6,5 @@ export interface IUserRequiredStepsAttributes extends IDefaultAttributes {
6
6
  stepNumber: number;
7
7
  isCompleted: boolean;
8
8
  appType: APP_TYPE;
9
+ instituteId?: string;
9
10
  }
@@ -25,6 +25,7 @@ export declare class DriverModel extends Model<IDriverModelAttributes, TDriverMo
25
25
  drivingLicense: string;
26
26
  appType?: APP_TYPE;
27
27
  status: COMMAN_STATUS;
28
+ district?: string;
28
29
  createdBy: string;
29
30
  updatedBy: string;
30
31
  deletedBy: string;
@@ -193,6 +193,10 @@ DriverModel.init({
193
193
  allowNull: true,
194
194
  defaultValue: app_1.COMMAN_STATUS.ACTIVE,
195
195
  },
196
+ district: {
197
+ type: sequelize_1.DataTypes.STRING,
198
+ allowNull: true,
199
+ }
196
200
  }, {
197
201
  modelName: 'DriverModel',
198
202
  tableName: 'drivers',
@@ -14,6 +14,7 @@ declare class RoleModel extends Model<IRoleAttributes, TRoleCreationAttributes>
14
14
  isInstituteDefault?: boolean;
15
15
  oldId?: string;
16
16
  academicCalendarId?: string;
17
+ masterId?: string;
17
18
  createdBy: string;
18
19
  updatedBy: string;
19
20
  deletedBy: string;
@@ -90,7 +90,12 @@ RoleModel.init({
90
90
  type: sequelize_1.DataTypes.UUID,
91
91
  field: 'academic_calendar_id',
92
92
  allowNull: true,
93
- }
93
+ },
94
+ masterId: {
95
+ type: sequelize_1.DataTypes.UUID,
96
+ field: 'master_id',
97
+ allowNull: true,
98
+ },
94
99
  }, {
95
100
  modelName: 'RoleModel',
96
101
  tableName: 'roles',
@@ -7,6 +7,7 @@ declare class UserRequiredSteps extends Model<IUserRequiredStepsAttributes> impl
7
7
  stepNumber: number;
8
8
  isCompleted: boolean;
9
9
  appType: APP_TYPE;
10
+ instituteId?: string;
10
11
  createdBy: string;
11
12
  updatedBy: string;
12
13
  deletedBy: string;
@@ -55,6 +55,11 @@ UserRequiredSteps.init({
55
55
  allowNull: false,
56
56
  field: 'app_type',
57
57
  },
58
+ instituteId: {
59
+ type: sequelize_1.DataTypes.UUID,
60
+ allowNull: true,
61
+ field: 'institute_id',
62
+ },
58
63
  }, {
59
64
  sequelize: index_1.sequelize,
60
65
  tableName: 'user_required_steps',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.268",
3
+ "version": "1.1.270",
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",