Merge branch 'add-uuid-db-columns' into registry-849

This commit is contained in:
Artur Beljajev 2018-06-13 07:43:28 +03:00
commit c170ec612f
4 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,6 @@
class ChangeContactsAndDomainsUuidToNotNull < ActiveRecord::Migration
def change
change_column_null :contacts, :uuid, false
change_column_null :domains, :uuid, false
end
end

View file

@ -640,7 +640,7 @@ CREATE TABLE contacts (
ident_updated_at timestamp without time zone,
upid integer,
up_date timestamp without time zone,
uuid uuid DEFAULT gen_random_uuid()
uuid uuid DEFAULT gen_random_uuid() NOT NULL
);
@ -913,7 +913,7 @@ CREATE TABLE domains (
statuses_backup character varying[] DEFAULT '{}'::character varying[],
upid integer,
up_date timestamp without time zone,
uuid uuid DEFAULT gen_random_uuid()
uuid uuid DEFAULT gen_random_uuid() NOT NULL
);
@ -4738,3 +4738,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180612042625');
INSERT INTO schema_migrations (version) VALUES ('20180612042953');
INSERT INTO schema_migrations (version) VALUES ('20180613030330');

View file

@ -8,6 +8,7 @@ john:
registrar: bestnames
code: john-001
auth_info: cacb5b
uuid: eb2f2766-b44c-4e14-9f16-32ab1a7cb957
william: &william
name: William
@ -27,6 +28,7 @@ william: &william
country_code: US
statuses:
- ok
uuid: 0aa54704-d6f7-4ca9-b8ca-2827d9a4e4eb
jane:
name: Jane
@ -38,6 +40,7 @@ jane:
registrar: bestnames
code: jane-001
auth_info: 0aa09f
uuid: 9db3de62-2414-4487-bee2-d5c155567768
acme_ltd:
name: Acme Ltd
@ -49,6 +52,7 @@ acme_ltd:
ident_country_code: US
code: acme-ltd-001
auth_info: 720b3c
uuid: f1dd365c-5be9-4b3d-a44e-3fa002465e4d
jack:
name: Jack
@ -60,12 +64,14 @@ jack:
ident_country_code: US
code: jack-001
auth_info: e2c440
uuid: 28b65455-6f1a-49fd-961c-0758886dbd75
identical_to_william:
<<: *william
registrar: goodnames
code: william-002
auth_info: 5ab865
uuid: c0a191d5-3793-4f0b-8f85-491612d0293e
not_in_use:
name: Useless
@ -73,6 +79,7 @@ not_in_use:
registrar: bestnames
code: useless-001
auth_info: e75a2a
uuid: ca613cc5-a8dc-48c1-8d32-d3c6a0b6c952
invalid:
name: any
@ -80,3 +87,4 @@ invalid:
email: invalid@invalid.test
auth_info: any
registrar: bestnames
uuid: bd80c0f9-26ee-49e0-a2cb-2311d931c433

View file

@ -7,6 +7,7 @@ shop:
valid_to: 2010-07-05
period: 1
period_unit: m
uuid: 1b3ee442-e8fe-4922-9492-8fcb9dccc69c
airport:
name: airport.test
@ -17,6 +18,7 @@ airport:
valid_to: 2010-07-05
period: 1
period_unit: m
uuid: 2df2c1a1-8f6a-490a-81be-8bdf29866880
library:
name: library.test
@ -27,6 +29,7 @@ library:
valid_to: 2010-07-05
period: 1
period_unit: m
uuid: 647bcc48-8d5e-4a04-8ce5-2a3cd17b6eab
metro:
name: metro.test
@ -37,6 +40,7 @@ metro:
valid_to: 2010-07-05
period: 1
period_unit: m
uuid: ef97cb80-333b-4893-b9df-163f2b452798
invalid:
name: invalid.test
@ -44,3 +48,4 @@ invalid:
valid_to: <%= Time.zone.parse('2010-07-05').utc.to_s(:db) %>
registrar: bestnames
registrant: invalid
uuid: 3c430ead-bb17-4b5b-aaa1-caa7dde7e138