ChangeLegalDocumentsDocumentTypeToNotNull

This commit is contained in:
Artur Beljajev 2019-12-19 14:53:53 +02:00 committed by Alex Sherman
parent 15a8a13a5d
commit 5004e29824
3 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class ChangeLegalDocumentsDocumentTypeToNotNull < ActiveRecord::Migration[5.0]
def change
change_column_null :legal_documents, :document_type, false
end
end

View file

@ -1069,7 +1069,7 @@ ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id;
CREATE TABLE public.legal_documents (
id integer NOT NULL,
document_type character varying,
document_type character varying NOT NULL,
documentable_id integer,
documentable_type character varying,
created_at timestamp without time zone,
@ -4829,6 +4829,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20191206183853'),
('20191212133136'),
('20191219112434'),
('20191219124429'),
('20191227110904'),
('20200113091254'),
('20200115102202'),

View file

@ -1,3 +1,4 @@
one:
documentable: shop (Domain)
document_type: pdf
path: some