diff --git a/db/migrate/20180228070102_change_invoices_vat_rate_type.rb b/db/migrate/20180228070102_change_invoices_vat_rate_type.rb new file mode 100644 index 000000000..2c0790a18 --- /dev/null +++ b/db/migrate/20180228070102_change_invoices_vat_rate_type.rb @@ -0,0 +1,5 @@ +class ChangeInvoicesVatRateType < ActiveRecord::Migration + def change + change_column :invoices, :vat_rate, :decimal, precision: 4, scale: 3 + end +end diff --git a/db/structure.sql b/db/structure.sql index cb47a50c0..3f890fcd9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1127,7 +1127,7 @@ CREATE TABLE invoices ( currency character varying NOT NULL, description character varying, reference_no character varying, - vat_rate numeric(10,2) NOT NULL, + vat_rate numeric(4,3) NOT NULL, paid_at timestamp without time zone, seller_id integer, seller_name character varying NOT NULL, @@ -5117,3 +5117,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180228055259'); INSERT INTO schema_migrations (version) VALUES ('20180228064342'); +INSERT INTO schema_migrations (version) VALUES ('20180228070102'); +