@kipicore/dbcore 1.1.671 → 1.1.672

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,22 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('users');
4
+ if (!table.portfolio_theme) {
5
+ await queryInterface.addColumn('users', 'portfolio_theme', {
6
+ type: Sequelize.STRING,
7
+ defaultValue: null,
8
+ allowNull: true,
9
+ field: 'portfolio_theme',
10
+ });
11
+ }
12
+ };
13
+ const down = async (queryInterface, Sequelize) => {
14
+ const table = await queryInterface.describeTable('users');
15
+ if (table.portfolio_theme) {
16
+ await queryInterface.removeColumn('users', 'portfolio_theme');
17
+ }
18
+ };
19
+ module.exports = {
20
+ up,
21
+ down,
22
+ };
@@ -43,4 +43,5 @@ export interface IUserAttributes extends IDefaultAttributes {
43
43
  area?: string;
44
44
  taluka?: string;
45
45
  status?: USER_STATUS;
46
+ portfolioTheme?: string;
46
47
  }
@@ -45,6 +45,7 @@ declare class UserModel extends Model<IUserAttributes, TUserCreationAttributes>
45
45
  area?: string;
46
46
  taluka?: string;
47
47
  status?: USER_STATUS;
48
+ portfolioTheme?: string;
48
49
  readonly createdAt: Date;
49
50
  readonly deletedAt: string;
50
51
  readonly updatedAt: Date;
@@ -187,6 +187,7 @@ UserModel.init({
187
187
  relation: { type: sequelize_1.DataTypes.STRING, allowNull: true },
188
188
  taluka: { type: sequelize_1.DataTypes.STRING, allowNull: true },
189
189
  status: { type: sequelize_1.DataTypes.STRING, allowNull: true, defaultValue: app_1.USER_STATUS.ACTIVE },
190
+ portfolioTheme: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'portfolio_theme' }
190
191
  }, {
191
192
  modelName: 'UserModel',
192
193
  tableName: 'users',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.671",
3
+ "version": "1.1.672",
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",