Revert "Merge pull request #1902 from internetee/1900-removing-registry-lock-should-not-remove-statuses-set-prior-to-setting-it"

This reverts commit f6fcf15fff, reversing
changes made to 26618a3c90.
This commit is contained in:
Alex Sherman 2021-04-14 12:31:26 +05:00
parent c1dba6c8f6
commit eac7dd352b
14 changed files with 10 additions and 172 deletions

View file

@ -1,13 +0,0 @@
class TransferDomainStatusesBeforeForceDeleteToJsonHistory < ActiveRecord::Migration[6.0]
def up
domains = Domain.where.not(statuses_before_force_delete: nil)
domains.each do |domain|
domain.force_delete_domain_statuses_history = domain.statuses_before_force_delete
domain.save
end
end
def down
# raise ActiveRecord::IrreversibleMigration
end
end

View file

@ -1,13 +0,0 @@
class TransferDataFromDomainStatusesToAdminStatusHistory < ActiveRecord::Migration[6.0]
def up
domains = Domain.all.select { |d| !d.locked_by_registrant?}
domains.each do |domain|
domain.admin_store_statuses_history = domain.statuses
domain.save
end
end
def down
# raise ActiveRecord::IrreversibleMigration
end
end

View file

@ -1,2 +1 @@
# encoding: UTF-8
DataMigrate::Data.define(version: 20210405081552)
DataMigrate::Data.define(version: 20201007104651)

View file

@ -1,6 +0,0 @@
class AddJsonStatusesHistoryFieldToDomain < ActiveRecord::Migration[6.0]
def change
add_column :domains, :json_statuses_history, :jsonb
add_index :domains, :json_statuses_history, using: :gin
end
end

View file

@ -843,8 +843,7 @@ 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,
json_statuses_history jsonb
force_delete_data public.hstore
);
@ -4125,17 +4124,6 @@ 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: -
--
-- Name: index_domains_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@ -5313,5 +5301,4 @@ INSERT INTO "schema_migrations" (version) VALUES
('20200916125326'),
('20200917104213'),
('20210215101019'),
('20200921084356'),
('20210405100631');
('20200921084356');