-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from oleynikd/tax-precisions
Increased tax_amount_withheld decimal precision
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...1130829_change_tax_amount_withheld_column_precision_in_bills_and_sales_invoices_tables.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// This migration changes the precision of the tax_amount_withheld column in the bills and sales_invoices tables from 8, 2 to 13, 2. | ||
// This migration is necessary to allow tax_amount_withheld filed to store values bigger than 999,999.99. | ||
|
||
exports.up = function(knex) { | ||
return knex.schema.alterTable('bills', function (table) { | ||
table.decimal('tax_amount_withheld', 13, 2).alter(); | ||
}).alterTable('sales_invoices', function (table) { | ||
table.decimal('tax_amount_withheld', 13, 2).alter(); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex) { | ||
return knex.schema.alterTable('bills', function (table) { | ||
table.decimal('tax_amount_withheld', 8, 2).alter(); | ||
}).alterTable('sales_invoices', function (table) { | ||
table.decimal('tax_amount_withheld', 8, 2).alter(); | ||
}); | ||
}; |