diff --git a/db/migrate/20180313124751_change_invoices_total_to_not_null.rb b/db/migrate/20180313124751_change_invoices_total_to_not_null.rb new file mode 100644 index 000000000..fb31f4084 --- /dev/null +++ b/db/migrate/20180313124751_change_invoices_total_to_not_null.rb @@ -0,0 +1,5 @@ +class ChangeInvoicesTotalToNotNull < ActiveRecord::Migration + def change + change_column_null :invoices, :total, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 6df03a91a..32a7b3891 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1036,7 +1036,7 @@ CREATE TABLE invoices ( updator_str character varying, number integer, cancelled_at timestamp without time zone, - total numeric(10,2), + total numeric(10,2) NOT NULL, in_directo boolean DEFAULT false ); @@ -4716,3 +4716,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180310142630'); INSERT INTO schema_migrations (version) VALUES ('20180313090437'); +INSERT INTO schema_migrations (version) VALUES ('20180313124751'); +