Add database constraints

#694
This commit is contained in:
Artur Beljajev 2018-02-14 22:09:26 +02:00
parent e3abdc2394
commit ea08abf9e8
2 changed files with 12 additions and 3 deletions

View file

@ -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

View file

@ -954,12 +954,12 @@ ALTER SEQUENCE domain_statuses_id_seq OWNED BY domain_statuses.id;
CREATE TABLE domain_transfers ( CREATE TABLE domain_transfers (
id integer NOT NULL, id integer NOT NULL,
domain_id integer, domain_id integer NOT NULL,
status character varying, status character varying,
transfer_requested_at timestamp without time zone, transfer_requested_at timestamp without time zone,
transferred_at timestamp without time zone, transferred_at timestamp without time zone,
old_registrar_id integer, old_registrar_id integer NOT NULL,
new_registrar_id integer, new_registrar_id integer NOT NULL,
created_at timestamp without time zone, created_at timestamp without time zone,
updated_at timestamp without time zone, updated_at timestamp without time zone,
wait_until 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 ('20180126104903');
INSERT INTO schema_migrations (version) VALUES ('20180214200224');