diff --git a/db/migrate/20191219112434_change_legal_documents_path_to_not_null.rb b/db/migrate/20191219112434_change_legal_documents_path_to_not_null.rb new file mode 100644 index 000000000..1198d00f0 --- /dev/null +++ b/db/migrate/20191219112434_change_legal_documents_path_to_not_null.rb @@ -0,0 +1,5 @@ +class ChangeLegalDocumentsPathToNotNull < ActiveRecord::Migration[5.0] + def change + change_column_null :legal_documents, :path, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 0ce89f0d2..5ce5c7382 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1074,7 +1074,7 @@ CREATE TABLE public.legal_documents ( documentable_type character varying, created_at timestamp without time zone, creator_str character varying, - path character varying, + path character varying NOT NULL, checksum character varying ); @@ -4828,6 +4828,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20191203083643'), ('20191206183853'), ('20191212133136'), +('20191219112434'), ('20191227110904'), ('20200113091254'), ('20200115102202'), @@ -4849,5 +4850,3 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200811074839'), ('20200812090409'), ('20200812125810'); - - diff --git a/test/fixtures/legal_documents.yml b/test/fixtures/legal_documents.yml index 3781f5b0c..f4b4213c9 100644 --- a/test/fixtures/legal_documents.yml +++ b/test/fixtures/legal_documents.yml @@ -1,2 +1,3 @@ one: documentable: shop (Domain) + path: some