From 6659c597d7a4b274095be2449c811c929c33dbbb Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 4 Apr 2019 18:21:08 +0300 Subject: [PATCH] Change `log_domains.children` database column's type to `jsonb` --- ...190404140234_change_log_domains_children_type_to_jsonb.rb | 5 +++++ db/structure.sql | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20190404140234_change_log_domains_children_type_to_jsonb.rb diff --git a/db/migrate/20190404140234_change_log_domains_children_type_to_jsonb.rb b/db/migrate/20190404140234_change_log_domains_children_type_to_jsonb.rb new file mode 100644 index 000000000..b511d7293 --- /dev/null +++ b/db/migrate/20190404140234_change_log_domains_children_type_to_jsonb.rb @@ -0,0 +1,5 @@ +class ChangeLogDomainsChildrenTypeToJsonb < ActiveRecord::Migration + def change + change_column :log_domains, :children, 'jsonb USING children::jsonb' + end +end \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index d1f379a74..0a1a8203f 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1466,7 +1466,7 @@ CREATE TABLE public.log_domains ( object_changes json, created_at timestamp without time zone, session character varying, - children json, + children jsonb, uuid character varying ); @@ -4792,6 +4792,8 @@ INSERT INTO schema_migrations (version) VALUES ('20190328151516'); INSERT INTO schema_migrations (version) VALUES ('20190328151838'); +INSERT INTO schema_migrations (version) VALUES ('20190404140234'); + INSERT INTO schema_migrations (version) VALUES ('20190415120246'); INSERT INTO schema_migrations (version) VALUES ('20190426174225');