@kipicore/dbcore 1.1.538 → 1.1.540

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
+ declare const _exports: import("sequelize-cli").Migration;
2
+ export = _exports;
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+ /** @type {import('sequelize-cli').Migration} */
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ const table = await queryInterface.describeTable('past_year_record');
6
+ if (!table.medium) {
7
+ await queryInterface.addColumn('past_year_record', 'medium', {
8
+ type: Sequelize.STRING,
9
+ allowNull: true,
10
+ });
11
+ }
12
+ if (!table.board) {
13
+ await queryInterface.addColumn('past_year_record', 'board', {
14
+ type: Sequelize.STRING,
15
+ allowNull: true,
16
+ });
17
+ }
18
+ },
19
+ async down(queryInterface, Sequelize) {
20
+ const table = await queryInterface.describeTable('past_year_record');
21
+ if (table.medium) {
22
+ await queryInterface.removeColumn('past_year_record', 'medium');
23
+ }
24
+ if (table.board) {
25
+ await queryInterface.removeColumn('past_year_record', 'board');
26
+ }
27
+ }
28
+ };
@@ -9,6 +9,8 @@ export interface IPastYearRecordModelAttributes extends IDefaultAttributes {
9
9
  failedStudent: number;
10
10
  schoolResult: number;
11
11
  boardResult: number;
12
+ medium?: string;
13
+ board?: string;
12
14
  instituteId: string;
13
15
  academicCalendarId: string;
14
16
  }
@@ -1,5 +1,6 @@
1
+ import { Document } from 'mongoose';
1
2
  import { IDefaultAttributes } from './commonInterface';
2
- export interface IPastYearRecordTopperModelAttributes extends IDefaultAttributes {
3
+ export interface IPastYearRecordTopperModelAttributes extends IDefaultAttributes, Document {
3
4
  id: string;
4
5
  fullName: string;
5
6
  img?: string;
@@ -11,6 +11,8 @@ export declare class PastYearRecordModel extends Model<IPastYearRecordModelAttri
11
11
  failedStudent: number;
12
12
  schoolResult: number;
13
13
  boardResult: number;
14
+ medium: string;
15
+ board: string;
14
16
  academicCalendarId: string;
15
17
  instituteId: string;
16
18
  createdBy: string;
@@ -74,6 +74,14 @@ PastYearRecordModel.init({
74
74
  type: sequelize_1.DataTypes.FLOAT,
75
75
  field: 'board_result',
76
76
  },
77
+ medium: {
78
+ type: sequelize_1.DataTypes.STRING,
79
+ allowNull: true,
80
+ },
81
+ board: {
82
+ type: sequelize_1.DataTypes.STRING,
83
+ allowNull: true,
84
+ },
77
85
  instituteId: {
78
86
  type: sequelize_1.DataTypes.UUID,
79
87
  field: 'institute_id',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.538",
3
+ "version": "1.1.540",
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",