aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170106135000_add_calendar_ref_to_time_tables.rb5
-rw-r--r--db/schema.rb4
2 files changed, 8 insertions, 1 deletions
diff --git a/db/migrate/20170106135000_add_calendar_ref_to_time_tables.rb b/db/migrate/20170106135000_add_calendar_ref_to_time_tables.rb
new file mode 100644
index 000000000..9c7b8b578
--- /dev/null
+++ b/db/migrate/20170106135000_add_calendar_ref_to_time_tables.rb
@@ -0,0 +1,5 @@
+class AddCalendarRefToTimeTables < ActiveRecord::Migration
+ def change
+ add_reference :time_tables, :calendar, index: true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 562bf2ab6..ab58b696f 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: 20161228092957) do
+ActiveRecord::Schema.define(version: 20170106135000) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -644,8 +644,10 @@ ActiveRecord::Schema.define(version: 20161228092957) do
t.integer "int_day_types", default: 0
t.date "start_date"
t.date "end_date"
+ t.integer "calendar_id"
end
+ add_index "time_tables", ["calendar_id"], :name => "index_time_tables_on_calendar_id"
add_index "time_tables", ["objectid"], :name => "time_tables_objectid_key", :unique => true
create_table "time_tables_vehicle_journeys", id: false, force: true do |t|