mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Merge branch 'master' into registry-787
# Conflicts: # db/structure.sql
This commit is contained in:
commit
c2458c7ad4
55 changed files with 654 additions and 648 deletions
|
@ -0,0 +1,17 @@
|
|||
class AddRegistrarsUniqueConstraints < ActiveRecord::Migration
|
||||
def up
|
||||
execute <<-SQL
|
||||
ALTER TABLE registrars ADD CONSTRAINT unique_name UNIQUE (name);
|
||||
ALTER TABLE registrars ADD CONSTRAINT unique_reference_no UNIQUE (reference_no);
|
||||
ALTER TABLE registrars ADD CONSTRAINT unique_code UNIQUE (code);
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute <<-SQL
|
||||
ALTER TABLE registrars DROP CONSTRAINT unique_name;
|
||||
ALTER TABLE registrars DROP CONSTRAINT unique_reference_no;
|
||||
ALTER TABLE registrars DROP CONSTRAINT unique_code;
|
||||
SQL
|
||||
end
|
||||
end
|
6
db/migrate/20180309053921_remove_registrars_indexes.rb
Normal file
6
db/migrate/20180309053921_remove_registrars_indexes.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class RemoveRegistrarsIndexes < ActiveRecord::Migration
|
||||
def change
|
||||
remove_index :registrars, name: :index_registrars_on_code
|
||||
remove_index :registrars, name: :index_registrars_on_legacy_id
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class AddRegistrarsNotNullConstraints < ActiveRecord::Migration
|
||||
def change
|
||||
change_column_null :registrars, :name, false
|
||||
change_column_null :registrars, :reg_no, false
|
||||
change_column_null :registrars, :country_code, false
|
||||
change_column_null :registrars, :email, false
|
||||
change_column_null :registrars, :code, false
|
||||
end
|
||||
end
|
|
@ -2135,22 +2135,22 @@ ALTER SEQUENCE registrant_verifications_id_seq OWNED BY registrant_verifications
|
|||
|
||||
CREATE TABLE registrars (
|
||||
id integer NOT NULL,
|
||||
name character varying,
|
||||
reg_no character varying,
|
||||
name character varying NOT NULL,
|
||||
reg_no character varying NOT NULL,
|
||||
vat_no character varying,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
phone character varying,
|
||||
email character varying,
|
||||
email character varying NOT NULL,
|
||||
billing_email character varying,
|
||||
country_code character varying,
|
||||
country_code character varying NOT NULL,
|
||||
state character varying,
|
||||
city character varying,
|
||||
street character varying,
|
||||
zip character varying,
|
||||
code character varying,
|
||||
code character varying NOT NULL,
|
||||
website character varying,
|
||||
accounting_customer_code character varying NOT NULL,
|
||||
vat boolean,
|
||||
|
@ -3242,6 +3242,14 @@ ALTER TABLE ONLY settings
|
|||
ADD CONSTRAINT settings_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY registrars
|
||||
ADD CONSTRAINT unique_code UNIQUE (code);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_contact_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -3250,6 +3258,22 @@ ALTER TABLE ONLY contacts
|
|||
ADD CONSTRAINT unique_contact_code UNIQUE (code);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY registrars
|
||||
ADD CONSTRAINT unique_name UNIQUE (name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_reference_no; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY registrars
|
||||
ADD CONSTRAINT unique_reference_no UNIQUE (reference_no);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_session_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -3852,20 +3876,6 @@ CREATE INDEX index_registrant_verifications_on_created_at ON registrant_verifica
|
|||
CREATE INDEX index_registrant_verifications_on_domain_id ON registrant_verifications USING btree (domain_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_registrars_on_code; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_registrars_on_code ON registrars USING btree (code);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_registrars_on_legacy_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_registrars_on_legacy_id ON registrars USING btree (legacy_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_settings_on_thing_type_and_thing_id_and_var; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4678,5 +4688,11 @@ INSERT INTO schema_migrations (version) VALUES ('20180306183549');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180308123240');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180309053424');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180309053921');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180309054510');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180327151906');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue