mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Merge pull request #936 from internetee/add-contacts-email-constraint
Change `contacts.email` to NOT NULL
This commit is contained in:
commit
39fe8ef6ce
4 changed files with 12 additions and 5 deletions
|
@ -0,0 +1,5 @@
|
|||
class ChangeContactsEmailToNotNull < ActiveRecord::Migration
|
||||
def change
|
||||
change_column_null :contacts, :email, false
|
||||
end
|
||||
end
|
|
@ -613,7 +613,7 @@ CREATE TABLE public.contacts (
|
|||
id integer NOT NULL,
|
||||
code character varying NOT NULL,
|
||||
phone character varying,
|
||||
email character varying,
|
||||
email character varying NOT NULL,
|
||||
fax character varying,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
|
@ -4761,3 +4761,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180613045614');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180713154915');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180816123540');
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ class ContactVersionsTest < ApplicationSystemTestCase
|
|||
VALUES (75, 'test_registrar', 'test123', 'test@test.com', 'EE', 'TEST123',
|
||||
'test123', 'en');
|
||||
|
||||
INSERT INTO contacts (id, code, auth_info, registrar_id)
|
||||
VALUES (75, 'test_code', '8b4d462aa04194ca78840a', 75);
|
||||
INSERT INTO contacts (id, code, email, auth_info, registrar_id)
|
||||
VALUES (75, 'test_code', 'test@inbox.test', '8b4d462aa04194ca78840a', 75);
|
||||
|
||||
INSERT INTO log_contacts (item_type, item_id, event, whodunnit, object,
|
||||
object_changes, created_at, session, children, ident_updated_at, uuid)
|
||||
|
|
|
@ -21,8 +21,8 @@ class DomainVersionsTest < ApplicationSystemTestCase
|
|||
VALUES (54, 'test_registrar', 'test123', 'test@test.com', 'EE', 'TEST123',
|
||||
'test123', 'en');
|
||||
|
||||
INSERT INTO contacts (id, code, auth_info, registrar_id)
|
||||
VALUES (54, 'test_code', '8b4d462aa04194ca78840a', 54);
|
||||
INSERT INTO contacts (id, code, email, auth_info, registrar_id)
|
||||
VALUES (54, 'test_code', 'test@inbox.test', '8b4d462aa04194ca78840a', 54);
|
||||
|
||||
INSERT INTO domains (id, registrar_id, valid_to, registrant_id,
|
||||
transfer_code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue