mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix: inventory adjustment cost out of range.
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('inventory_adjustments_entries', table => {
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('inventory_adjustments_entries', (table) => {
|
||||
table.increments();
|
||||
table.integer('adjustment_id').unsigned().index().references('id').inTable('inventory_adjustments');
|
||||
table
|
||||
.integer('adjustment_id')
|
||||
.unsigned()
|
||||
.index()
|
||||
.references('id')
|
||||
.inTable('inventory_adjustments');
|
||||
table.integer('index').unsigned();
|
||||
table.integer('item_id').unsigned().index().references('id').inTable('items');
|
||||
table
|
||||
.integer('item_id')
|
||||
.unsigned()
|
||||
.index()
|
||||
.references('id')
|
||||
.inTable('items');
|
||||
table.integer('quantity');
|
||||
table.decimal('cost').unsigned();
|
||||
table.decimal('value').unsigned();
|
||||
table.decimal('cost', 13, 3).unsigned();
|
||||
table.decimal('value', 13, 3).unsigned();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
exports.down = function (knex) {
|
||||
return knex.schema.dropTableIfExists('inventory_adjustments_entries');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user