mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
Merge branch 'add-uuid-db-columns' into registry-849
This commit is contained in:
commit
50b66476c1
4 changed files with 39 additions and 2 deletions
5
db/migrate/20180612042234_enable_pgcrypto_ext.rb
Normal file
5
db/migrate/20180612042234_enable_pgcrypto_ext.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class EnablePgcryptoExt < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
enable_extension 'pgcrypto'
|
||||||
|
end
|
||||||
|
end
|
5
db/migrate/20180612042625_add_uuid_to_contacts.rb
Normal file
5
db/migrate/20180612042625_add_uuid_to_contacts.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class AddUuidToContacts < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :contacts, :uuid, :uuid, default: 'gen_random_uuid()'
|
||||||
|
end
|
||||||
|
end
|
5
db/migrate/20180612042953_add_uuid_to_domains.rb
Normal file
5
db/migrate/20180612042953_add_uuid_to_domains.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class AddUuidToDomains < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :domains, :uuid, :uuid, default: 'gen_random_uuid()'
|
||||||
|
end
|
||||||
|
end
|
|
@ -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';
|
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;
|
SET search_path = public, pg_catalog;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -625,7 +639,8 @@ CREATE TABLE contacts (
|
||||||
original_id integer,
|
original_id integer,
|
||||||
ident_updated_at timestamp without time zone,
|
ident_updated_at timestamp without time zone,
|
||||||
upid integer,
|
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,
|
status_notes hstore,
|
||||||
statuses_backup character varying[] DEFAULT '{}'::character varying[],
|
statuses_backup character varying[] DEFAULT '{}'::character varying[],
|
||||||
upid integer,
|
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 ('20180331200125');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20180612042234');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20180612042625');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20180612042953');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue