diff --git a/db/migrate/20210708131814_add_json_statuses_history_field_to_domain.rb b/db/migrate/20210708131814_add_json_statuses_history_field_to_domain.rb new file mode 100644 index 000000000..0f177683b --- /dev/null +++ b/db/migrate/20210708131814_add_json_statuses_history_field_to_domain.rb @@ -0,0 +1,6 @@ +class AddJsonStatusesHistoryFieldToDomain < ActiveRecord::Migration[6.1] + def change + add_column :domains, :json_statuses_history, :jsonb + add_index :domains, :json_statuses_history, using: :gin + end +end diff --git a/db/structure.sql b/db/structure.sql index 481732b8a..54d740fa5 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -933,7 +933,8 @@ CREATE TABLE public.domains ( uuid uuid DEFAULT public.gen_random_uuid() NOT NULL, locked_by_registrant_at timestamp without time zone, force_delete_start timestamp without time zone, - force_delete_data public.hstore + force_delete_data public.hstore, + json_statuses_history jsonb ); @@ -3985,6 +3986,13 @@ CREATE INDEX index_domain_transfers_on_domain_id ON public.domain_transfers USIN CREATE INDEX index_domains_on_delete_date ON public.domains USING btree (delete_date); +-- +-- Name: index_domains_on_json_statuses_history; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_domains_on_json_statuses_history ON public.domains USING gin (json_statuses_history); + + -- -- Name: index_domains_on_name; Type: INDEX; Schema: public; Owner: - -- @@ -5152,6 +5160,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200917104213'), ('20200921084356'), ('20210215101019'), -('20210616112332'); +('20210616112332'), +('20210708131814');