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

This commit is contained in:
Artur Beljajev 2018-06-12 08:01:10 +03:00
commit 50b66476c1
4 changed files with 39 additions and 2 deletions

View file

@ -0,0 +1,5 @@
class EnablePgcryptoExt < ActiveRecord::Migration
def change
enable_extension 'pgcrypto'
end
end

View file

@ -0,0 +1,5 @@
class AddUuidToContacts < ActiveRecord::Migration
def change
add_column :contacts, :uuid, :uuid, default: 'gen_random_uuid()'
end
end

View file

@ -0,0 +1,5 @@
class AddUuidToDomains < ActiveRecord::Migration
def change
add_column :domains, :uuid, :uuid, default: 'gen_random_uuid()'
end
end

View file

@ -51,6 +51,20 @@ CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs';
--
-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
--
-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
SET search_path = public, pg_catalog;
--
@ -625,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()
);
@ -897,7 +912,8 @@ CREATE TABLE domains (
status_notes hstore,
statuses_backup character varying[] DEFAULT '{}'::character varying[],
upid integer,
up_date timestamp without time zone
up_date timestamp without time zone,
uuid uuid DEFAULT gen_random_uuid()
);
@ -4716,3 +4732,9 @@ INSERT INTO schema_migrations (version) VALUES ('20180327151906');
INSERT INTO schema_migrations (version) VALUES ('20180331200125');
INSERT INTO schema_migrations (version) VALUES ('20180612042234');
INSERT INTO schema_migrations (version) VALUES ('20180612042625');
INSERT INTO schema_migrations (version) VALUES ('20180612042953');