From 6f9ea85a95dd9b55efd2ad5da4e676c4c9d7ea7c Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 28 Feb 2018 09:05:41 +0200 Subject: [PATCH] Change `invoices.vat_rate` DB column to NULL #623 --- db/migrate/20180228070431_change_invoice_vat_rate_to_null.rb | 5 +++++ db/structure.sql | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20180228070431_change_invoice_vat_rate_to_null.rb diff --git a/db/migrate/20180228070431_change_invoice_vat_rate_to_null.rb b/db/migrate/20180228070431_change_invoice_vat_rate_to_null.rb new file mode 100644 index 000000000..37b8394b5 --- /dev/null +++ b/db/migrate/20180228070431_change_invoice_vat_rate_to_null.rb @@ -0,0 +1,5 @@ +class ChangeInvoiceVatRateToNull < ActiveRecord::Migration + def change + change_column_null :invoices, :vat_rate, true + end +end diff --git a/db/structure.sql b/db/structure.sql index 3f890fcd9..ba040e7cd 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(4,3) NOT NULL, + vat_rate numeric(4,3), paid_at timestamp without time zone, seller_id integer, seller_name character varying NOT NULL, @@ -5119,3 +5119,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180228064342'); INSERT INTO schema_migrations (version) VALUES ('20180228070102'); +INSERT INTO schema_migrations (version) VALUES ('20180228070431'); +