@kipicore/dbcore 1.1.344 → 1.1.345

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,25 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('file_storage');
4
+ if (table.file_path) {
5
+ await queryInterface.changeColumn('file_storage', 'file_path', {
6
+ type: Sequelize.TEXT,
7
+ allowNull: true,
8
+ field: 'file_path',
9
+ });
10
+ }
11
+ };
12
+ const down = async (queryInterface, Sequelize) => {
13
+ const table = await queryInterface.describeTable('file_storage');
14
+ if (table.file_path) {
15
+ await queryInterface.changeColumn('file_storage', 'file_path', {
16
+ type: Sequelize.STRING,
17
+ allowNull: true,
18
+ field: 'file_path',
19
+ });
20
+ }
21
+ };
22
+ module.exports = {
23
+ up,
24
+ down,
25
+ };
@@ -102,7 +102,7 @@ FileStorageModel.init({
102
102
  allowNull: true,
103
103
  },
104
104
  filePath: {
105
- type: sequelize_1.DataTypes.STRING,
105
+ type: sequelize_1.DataTypes.TEXT,
106
106
  field: 'file_path',
107
107
  allowNull: true,
108
108
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.344",
3
+ "version": "1.1.345",
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",