diff --git a/db/migrate/20180612042625_add_uuid_to_contacts.rb b/db/migrate/20180612042625_add_uuid_to_contacts.rb new file mode 100644 index 000000000..c80d60e71 --- /dev/null +++ b/db/migrate/20180612042625_add_uuid_to_contacts.rb @@ -0,0 +1,5 @@ +class AddUuidToContacts < ActiveRecord::Migration + def change + add_column :contacts, :uuid, :uuid, default: 'gen_random_uuid()' + end +end diff --git a/db/structure.sql b/db/structure.sql index de3c10c61..1332bccfb 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -639,7 +639,8 @@ CREATE TABLE contacts ( original_id integer, ident_updated_at timestamp without time zone, upid integer, - up_date timestamp without time zone + up_date timestamp without time zone, + uuid uuid DEFAULT gen_random_uuid() ); @@ -4732,3 +4733,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180331200125'); INSERT INTO schema_migrations (version) VALUES ('20180612042234'); +INSERT INTO schema_migrations (version) VALUES ('20180612042625'); +