diff --git a/db/migrate/20180214200224_add_domain_transfers_constraints.rb b/db/migrate/20180214200224_add_domain_transfers_constraints.rb new file mode 100644 index 000000000..bd4023deb --- /dev/null +++ b/db/migrate/20180214200224_add_domain_transfers_constraints.rb @@ -0,0 +1,7 @@ +class AddDomainTransfersConstraints < ActiveRecord::Migration + def change + change_column_null :domain_transfers, :domain_id, false + change_column_null :domain_transfers, :old_registrar_id, false + change_column_null :domain_transfers, :new_registrar_id, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 2cad3e06f..7e8fef018 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -954,12 +954,12 @@ ALTER SEQUENCE domain_statuses_id_seq OWNED BY domain_statuses.id; CREATE TABLE domain_transfers ( id integer NOT NULL, - domain_id integer, + domain_id integer NOT NULL, status character varying, transfer_requested_at timestamp without time zone, transferred_at timestamp without time zone, - old_registrar_id integer, - new_registrar_id integer, + old_registrar_id integer NOT NULL, + new_registrar_id integer NOT NULL, created_at timestamp without time zone, updated_at timestamp without time zone, wait_until timestamp without time zone @@ -5070,3 +5070,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180126104536'); INSERT INTO schema_migrations (version) VALUES ('20180126104903'); +INSERT INTO schema_migrations (version) VALUES ('20180214200224'); +