Bansari Akhani commited on
Commit
1fa8cbc
·
1 Parent(s): 1421ecc

set invoice id nullable in error logs

Browse files
src/db/migrations/20240711115635-create-error-log.js CHANGED
@@ -10,7 +10,7 @@ module.exports = {
10
  type: Sequelize.INTEGER
11
  },
12
  invoice_id: {
13
- allowNull: false,
14
  type: Sequelize.INTEGER,
15
  references: {
16
  model: 'invoices',
@@ -37,4 +37,4 @@ module.exports = {
37
  async down(queryInterface, Sequelize) {
38
  await queryInterface.dropTable('error_log');
39
  }
40
- };
 
10
  type: Sequelize.INTEGER
11
  },
12
  invoice_id: {
13
+ allowNull: true,
14
  type: Sequelize.INTEGER,
15
  references: {
16
  model: 'invoices',
 
37
  async down(queryInterface, Sequelize) {
38
  await queryInterface.dropTable('error_log');
39
  }
40
+ };