mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Merge branch 'registry-475-refactor-zones' into registry-475
# Conflicts: # db/schema-read-only.rb # db/structure.sql
This commit is contained in:
commit
dbca4d010a
12 changed files with 165 additions and 24 deletions
13
db/migrate/20170424115801_add_unique_index_to_zone_origin.rb
Normal file
13
db/migrate/20170424115801_add_unique_index_to_zone_origin.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class AddUniqueIndexToZoneOrigin < ActiveRecord::Migration
|
||||
def up
|
||||
execute <<-SQL
|
||||
ALTER TABLE zones ADD CONSTRAINT unique_zone_origin UNIQUE (origin)
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute <<-SQL
|
||||
ALTER TABLE zones DROP CONSTRAINT unique_zone_origin
|
||||
SQL
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170423222302) do
|
||||
ActiveRecord::Schema.define(version: 20170424115801) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -1130,4 +1130,6 @@ ActiveRecord::Schema.define(version: 20170423222302) do
|
|||
t.text "a4_records"
|
||||
end
|
||||
|
||||
add_index "zones", ["origin"], name: "unique_zone_origin", unique: true, using: :btree
|
||||
|
||||
end
|
||||
|
|
|
@ -2490,7 +2490,7 @@ ALTER SEQUENCE people_id_seq OWNED BY people.id;
|
|||
|
||||
|
||||
--
|
||||
-- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
-- Name: prices; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE TABLE prices (
|
||||
|
@ -3852,7 +3852,7 @@ ALTER TABLE ONLY people
|
|||
|
||||
|
||||
--
|
||||
-- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
-- Name: prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY prices
|
||||
|
@ -3899,6 +3899,14 @@ ALTER TABLE ONLY settings
|
|||
ADD CONSTRAINT settings_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_zone_origin; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY zones
|
||||
ADD CONSTRAINT unique_zone_origin UNIQUE (origin);
|
||||
|
||||
|
||||
--
|
||||
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -5180,3 +5188,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170423214500');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170423222302');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170424115801');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue