@kipicore/dbcore 1.1.267 → 1.1.269

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
+ };
@@ -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
  }
@@ -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',
@@ -1,7 +1,7 @@
1
1
  import { Model } from 'sequelize';
2
2
  import { IMaintenanceModelAttributes } from '../../interfaces/maintenanceInterface';
3
- import { TIWorkOffDaysModelCreationAttributes } from '../../types/workOffDaysType';
4
- declare class MaintenanceModel extends Model<IMaintenanceModelAttributes, TIWorkOffDaysModelCreationAttributes> {
3
+ import { TIMaintenanceModelCreationAttributes } from '../../types';
4
+ declare class MaintenanceModel extends Model<IMaintenanceModelAttributes, TIMaintenanceModelCreationAttributes> {
5
5
  id: string;
6
6
  moduleName?: string;
7
7
  instituteId?: string;
@@ -114,7 +114,7 @@ MaintenanceModel.init({
114
114
  type: sequelize_1.DataTypes.BOOLEAN,
115
115
  field: 'is_remove',
116
116
  allowNull: true,
117
- }
117
+ },
118
118
  }, {
119
119
  modelName: 'MaintenanceModel',
120
120
  tableName: 'maintenance',
@@ -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.267",
3
+ "version": "1.1.269",
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",