aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorAlban Peignier2016-05-05 15:45:19 +0200
committerAlban Peignier2016-05-05 15:45:19 +0200
commit3adb65c09321d6edcec4045be6abeb34fe3bc672 (patch)
tree9c065a0f439e0cd8b8d0dacc4b7a631e92ab6747 /db
parent89092ca98ba6d1d692871db3e4b46f31dc9336ed (diff)
downloadchouette-core-3adb65c09321d6edcec4045be6abeb34fe3bc672.tar.bz2
Associate StopArea and StopAreaReferential. Refs #812
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160504160504_add_stop_area_referential_to_stop_areas.rb6
-rw-r--r--db/schema.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20160504160504_add_stop_area_referential_to_stop_areas.rb b/db/migrate/20160504160504_add_stop_area_referential_to_stop_areas.rb
new file mode 100644
index 000000000..2040a8272
--- /dev/null
+++ b/db/migrate/20160504160504_add_stop_area_referential_to_stop_areas.rb
@@ -0,0 +1,6 @@
+class AddStopAreaReferentialToStopAreas < ActiveRecord::Migration
+ def change
+ add_column :stop_areas, :stop_area_referential_id, :integer
+ add_index :stop_areas, :stop_area_referential_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 22064ff31..99448dd12 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160504130055) do
+ActiveRecord::Schema.define(version: 20160504160504) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -440,10 +440,12 @@ ActiveRecord::Schema.define(version: 20160504130055) do
t.string "city_name"
t.string "url"
t.string "time_zone"
+ t.integer "stop_area_referential_id"
end
add_index "stop_areas", ["objectid"], :name => "stop_areas_objectid_key", :unique => true
add_index "stop_areas", ["parent_id"], :name => "index_stop_areas_on_parent_id"
+ add_index "stop_areas", ["stop_area_referential_id"], :name => "index_stop_areas_on_stop_area_referential_id"
create_table "stop_areas_stop_areas", id: false, force: true do |t|
t.integer "child_id", limit: 8