Extract company register

Closes #1079, #916, #1077
This commit is contained in:
Artur Beljajev 2019-02-09 16:35:01 +02:00
parent 8c4e6f1656
commit 83f8a9fb6a
44 changed files with 530 additions and 610 deletions

View file

@ -0,0 +1,5 @@
class DropBusinessRegistryCaches < ActiveRecord::Migration
def change
drop_table :business_registry_caches
end
end

View file

@ -598,40 +598,6 @@ CREATE SEQUENCE public.blocked_domains_id_seq
ALTER SEQUENCE public.blocked_domains_id_seq OWNED BY public.blocked_domains.id;
--
-- Name: business_registry_caches; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE public.business_registry_caches (
id integer NOT NULL,
ident character varying,
ident_country_code character varying,
retrieved_on timestamp without time zone,
associated_businesses character varying[],
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: business_registry_caches_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.business_registry_caches_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: business_registry_caches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.business_registry_caches_id_seq OWNED BY public.business_registry_caches.id;
--
-- Name: certificates; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
@ -2594,13 +2560,6 @@ ALTER TABLE ONLY public.banklink_transactions ALTER COLUMN id SET DEFAULT nextva
ALTER TABLE ONLY public.blocked_domains ALTER COLUMN id SET DEFAULT nextval('public.blocked_domains_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.business_registry_caches ALTER COLUMN id SET DEFAULT nextval('public.business_registry_caches_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@ -3001,14 +2960,6 @@ ALTER TABLE ONLY public.blocked_domains
ADD CONSTRAINT blocked_domains_pkey PRIMARY KEY (id);
--
-- Name: business_registry_caches_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY public.business_registry_caches
ADD CONSTRAINT business_registry_caches_pkey PRIMARY KEY (id);
--
-- Name: certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
@ -3508,13 +3459,6 @@ CREATE INDEX index_accounts_on_registrar_id ON public.accounts USING btree (regi
CREATE INDEX index_blocked_domains_on_name ON public.blocked_domains USING btree (name);
--
-- Name: index_business_registry_caches_on_ident; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_business_registry_caches_on_ident ON public.business_registry_caches USING btree (ident);
--
-- Name: index_certificates_on_api_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@ -4985,6 +4929,8 @@ INSERT INTO schema_migrations (version) VALUES ('20190102115333');
INSERT INTO schema_migrations (version) VALUES ('20190102144032');
INSERT INTO schema_migrations (version) VALUES ('20190209150026');
INSERT INTO schema_migrations (version) VALUES ('20190311111718');
INSERT INTO schema_migrations (version) VALUES ('20190312211614');