@kipicore/dbcore 1.1.606 → 1.1.607

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,58 @@
1
+ 'use strict';
2
+ module.exports = {
3
+ up: async (queryInterface, Sequelize) => {
4
+ // rms_purchase_orders
5
+ await queryInterface.changeColumn('rms_purchase_orders', 'total_amount', {
6
+ type: Sequelize.DECIMAL(15, 2),
7
+ allowNull: true,
8
+ defaultValue: 0,
9
+ });
10
+ await queryInterface.changeColumn('rms_purchase_orders', 'tax_amount', {
11
+ type: Sequelize.DECIMAL(15, 2),
12
+ allowNull: true,
13
+ defaultValue: 0,
14
+ });
15
+ await queryInterface.changeColumn('rms_purchase_orders', 'discount_amount', {
16
+ type: Sequelize.DECIMAL(15, 2),
17
+ allowNull: true,
18
+ defaultValue: 0,
19
+ });
20
+ // rms_purchase_order_items
21
+ await queryInterface.changeColumn('rms_purchase_order_items', 'amount', {
22
+ type: Sequelize.DECIMAL(15, 2),
23
+ allowNull: true,
24
+ });
25
+ await queryInterface.changeColumn('rms_purchase_order_items', 'tax_amount', {
26
+ type: Sequelize.DECIMAL(15, 2),
27
+ allowNull: true,
28
+ defaultValue: 0,
29
+ });
30
+ },
31
+ down: async (queryInterface, Sequelize) => {
32
+ // Revert back to DECIMAL(10, 2)
33
+ await queryInterface.changeColumn('rms_purchase_orders', 'total_amount', {
34
+ type: Sequelize.DECIMAL(10, 2),
35
+ allowNull: true,
36
+ defaultValue: 0,
37
+ });
38
+ await queryInterface.changeColumn('rms_purchase_orders', 'tax_amount', {
39
+ type: Sequelize.DECIMAL(10, 2),
40
+ allowNull: true,
41
+ defaultValue: 0,
42
+ });
43
+ await queryInterface.changeColumn('rms_purchase_orders', 'discount_amount', {
44
+ type: Sequelize.DECIMAL(10, 2),
45
+ allowNull: true,
46
+ defaultValue: 0,
47
+ });
48
+ await queryInterface.changeColumn('rms_purchase_order_items', 'amount', {
49
+ type: Sequelize.DECIMAL(10, 2),
50
+ allowNull: true,
51
+ });
52
+ await queryInterface.changeColumn('rms_purchase_order_items', 'tax_amount', {
53
+ type: Sequelize.DECIMAL(10, 2),
54
+ allowNull: true,
55
+ defaultValue: 0,
56
+ });
57
+ }
58
+ };
@@ -91,7 +91,7 @@ RmsStockModel.init({
91
91
  }, {
92
92
  sequelize: index_1.sequelize,
93
93
  modelName: 'RmsStockModel',
94
- tableName: 'rms_inventory_stock',
94
+ tableName: 'rms_stock',
95
95
  timestamps: true,
96
96
  paranoid: true,
97
97
  });
@@ -91,7 +91,7 @@ RmsStockTransactionModel.init({
91
91
  }, {
92
92
  sequelize: index_1.sequelize,
93
93
  modelName: 'RmsStockTransactionModel',
94
- tableName: 'rms_inventory_transactions',
94
+ tableName: 'rms_stock_transactions',
95
95
  timestamps: true,
96
96
  paranoid: true,
97
97
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.606",
3
+ "version": "1.1.607",
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",