@kipicore/dbcore 1.1.356 → 1.1.357

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,21 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('lectures');
4
+ if (!table.substitute_date) {
5
+ await queryInterface.addColumn('lectures', 'substitute_date', {
6
+ type: Sequelize.DATE,
7
+ allowNull: true,
8
+ field: 'substitute_date',
9
+ });
10
+ }
11
+ };
12
+ const down = async (queryInterface) => {
13
+ const table = await queryInterface.describeTable('lectures');
14
+ if (table.substitute_date) {
15
+ await queryInterface.removeColumn('lectures', 'substitute_date');
16
+ }
17
+ };
18
+ module.exports = {
19
+ up,
20
+ down,
21
+ };
@@ -24,4 +24,5 @@ export interface ILectureModelAttributes extends IDefaultAttributes {
24
24
  shiftId?: string;
25
25
  slotId?: string;
26
26
  academicCalendarId?: string;
27
+ substituteDate?: Date;
27
28
  }
@@ -232,5 +232,6 @@ LectureModel.init({
232
232
  field: 'academic_calendar_id',
233
233
  allowNull: true,
234
234
  },
235
+ substituteDate: { type: sequelize_1.DataTypes.DATE, field: 'substitute_date', allowNull: true },
235
236
  }, { modelName: 'LectureModel', tableName: 'lectures', timestamps: true, sequelize: index_1.sequelize });
236
237
  exports.default = LectureModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.356",
3
+ "version": "1.1.357",
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",