aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock6
-rw-r--r--app/assets/images/logoMEDDE.jpgbin13842 -> 9767 bytes
-rw-r--r--app/assets/javascripts/public/jquery.ui.datepicker-i18n.js9
-rw-r--r--app/assets/javascripts/time_tables.js.coffee39
-rw-r--r--app/assets/javascripts/vehicle_journey.js.coffee6
-rw-r--r--app/assets/stylesheets/time_tables.css.scss61
-rw-r--r--app/views/exports/index.html.erb2
-rw-r--r--app/views/file_validations/index.html.erb2
-rw-r--r--app/views/imports/index.html.erb2
-rw-r--r--app/views/time_tables/_date_fields.erb4
-rw-r--r--app/views/time_tables/_dates.html.erb4
-rw-r--r--app/views/time_tables/_form.erb37
-rw-r--r--app/views/time_tables/_period_fields.erb5
-rw-r--r--app/views/time_tables/_periods.html.erb3
-rw-r--r--app/views/time_tables/show.html.erb27
-rw-r--r--config/environments/development.rb1
-rw-r--r--config/locales/exports.yml2
-rw-r--r--config/locales/file_validations.yml2
-rw-r--r--config/locales/imports.yml2
-rw-r--r--config/locales/time_tables.yml4
-rw-r--r--db/migrate/20120926144618_add_id_to_time_table_date.ninoxe_engine.rb13
-rw-r--r--db/migrate/20120926144619_add_id_to_time_table_period.ninoxe_engine.rb13
-rw-r--r--db/schema.rb33
24 files changed, 231 insertions, 47 deletions
diff --git a/Gemfile b/Gemfile
index ff0b9a92c..a7f6b8a5f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -40,6 +40,7 @@ gem 'gravatar_image_tag'
gem "acts_as_tree", :git => "git://github.com/dryade/acts_as_tree.git"
#gem 'ninoxe', :git => 'git://github.com/dryade/ninoxe.git'
+#gem 'ninoxe', :git => 'git://github.com/dryade/ninoxe.git', :branch => 'V2_0_0'
gem 'ninoxe', :git => 'git://chouette.dryade.priv/ninoxe' #, :path => '~/Projects/Ninoxe'
gem 'acts_as_list', '0.1.6'
diff --git a/Gemfile.lock b/Gemfile.lock
index 03ad2fb8d..b526715f7 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://chouette.dryade.priv/ninoxe
- revision: 848e356ff197dc5dcd143057e770373646b4c62c
+ revision: f6d327cfa9380bca083eacd5b6c060117a74f31b
specs:
ninoxe (0.0.8)
GeoRuby
@@ -61,7 +61,7 @@ GIT
GIT
remote: git://sim.dryade.priv/user_interface
- revision: 0fac5e33ba61eaa691a65d9a5f49f6acd3755927
+ revision: d828d7107f2b4025853cbfa7cc0e76cceca27da6
specs:
user_interface (0.0.1)
rails (> 3.1.0)
@@ -235,7 +235,7 @@ GEM
rack (>= 0.4)
rack-ssl (1.3.2)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.6)
actionmailer (= 3.2.6)
diff --git a/app/assets/images/logoMEDDE.jpg b/app/assets/images/logoMEDDE.jpg
index 51e0a3a44..06d4a2a1f 100644
--- a/app/assets/images/logoMEDDE.jpg
+++ b/app/assets/images/logoMEDDE.jpg
Binary files differ
diff --git a/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js b/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
index 3d0d55b46..b7748a77a 100644
--- a/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
+++ b/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
@@ -53,7 +53,14 @@ jQuery(function($){
monthNamesShort: $.datepicker.regional[ $('html').attr('lang') ].monthNamesShort,
monthNames: $.datepicker.regional[ $('html').attr('lang') ].monthNames
} );
- $(element).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $(element).val() ) );
+ if ($(element).val().indexOf('/') >= 0)
+ {
+ $(element).datepicker("setDate", $.datepicker.parseDate('dd/mm/y', $(element).val() ) );
+ }
+ else
+ {
+ $(element).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $(element).val() ) );
+ }
});
$("form").submit(function(event) {
diff --git a/app/assets/javascripts/time_tables.js.coffee b/app/assets/javascripts/time_tables.js.coffee
new file mode 100644
index 000000000..b85376edb
--- /dev/null
+++ b/app/assets/javascripts/time_tables.js.coffee
@@ -0,0 +1,39 @@
+jQuery ->
+# add trigger to hide/show application dates and periods
+ switch_dates = (event) ->
+ event.preventDefault()
+ $('.time_tables .dates.content').toggle('slow')
+ $('a.dates .switcher').toggle()
+
+ $('.time_tables a.dates').click(switch_dates)
+
+ switch_periods = (event) ->
+ event.preventDefault()
+ $('.time_tables .periods.content').toggle('slow')
+ $('a.periods .switcher').toggle()
+
+ $('.time_tables a.periods').click(switch_periods)
+
+# add trigger when creating new date or period entries to activate datepicker
+ tt_datepickerI18n = (index, element) ->
+ # do nothig if a datepicker is already attached
+ return if ($(element).hasClass('hasDatepicker') )
+ $(element).datepicker({
+ dateFormat: "dd/mm/y",
+ dayNamesShort: $.datepicker.regional[ $('html').attr('lang') ].dayNamesShort,
+ dayNames: $.datepicker.regional[ $('html').attr('lang') ].dayNames,
+ monthNamesShort: $.datepicker.regional[ $('html').attr('lang') ].monthNamesShort,
+ monthNames: $.datepicker.regional[ $('html').attr('lang') ].monthNames
+ })
+ $(element).datepicker("setDate", $.datepicker.parseDate('dd/mm/y', $(element).val() ) ) if ($(element).val().indexOf('/') >= 0)
+ $(element).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $(element).val() ) ) if ($(element).val().indexOf('/') < 0)
+
+ after_inserts = ->
+ $('input[type="date"]').each(tt_datepickerI18n)
+
+ bind_after_inserts = ->
+ $('#periods_content').bind('insertion-callback',after_inserts)
+ $('#dates_content').bind('insertion-callback',after_inserts)
+ #after_inserts()
+
+ $(document).ready(bind_after_inserts) if $('.time_tables').length > 0
diff --git a/app/assets/javascripts/vehicle_journey.js.coffee b/app/assets/javascripts/vehicle_journey.js.coffee
index 513d177c8..89bc8825f 100644
--- a/app/assets/javascripts/vehicle_journey.js.coffee
+++ b/app/assets/javascripts/vehicle_journey.js.coffee
@@ -1,6 +1,6 @@
jQuery ->
swap_hour_minute = ( from, to) ->
- rows = $('.vehicle_journeys.edit tbody.journey_pattern_dependent_list tr')
+ rows = $('.vehicle_journeys tbody.journey_pattern_dependent_list tr')
for row in rows
do (row) ->
$(row).find( to).find('.hour')[0].value = $(row).find( from).find('.hour')[0].value
@@ -10,13 +10,13 @@ jQuery ->
event.preventDefault()
swap_hour_minute( '.departure_time', '.arrival_time')
- $('.vehicle_journeys.edit a.to_arrivals').live("click", copy_departures_to_arrivals)
+ $('.vehicle_journeys a.to_arrivals').live("click", copy_departures_to_arrivals)
copy_arrivals_to_departures = (event) ->
event.preventDefault()
swap_hour_minute( '.arrival_time', '.departure_time')
- $('.vehicle_journeys.edit a.to_departures').live("click", copy_arrivals_to_departures)
+ $('.vehicle_journeys a.to_departures').live("click", copy_arrivals_to_departures)
switch_vehicle_journey_at_stops = (event) ->
event.preventDefault()
diff --git a/app/assets/stylesheets/time_tables.css.scss b/app/assets/stylesheets/time_tables.css.scss
index 6a168eb4f..f1ff7b3d2 100644
--- a/app/assets/stylesheets/time_tables.css.scss
+++ b/app/assets/stylesheets/time_tables.css.scss
@@ -103,6 +103,16 @@
#workspace.time_tables.edit,#workspace.time_tables.new,#workspace.time_tables.create,#workspace.time_tables.update
{
+ h3 {
+ .dates {
+ cursor: pointer;
+ }
+ .periods {
+ cursor: pointer;
+ }
+ }
+
+
.day_type ol {
float: left;
margin: 0;
@@ -126,4 +136,55 @@
.day_type ol li label {
padding-left: 10%;
}
+
+ .dates ol {
+ margin-top: -0.3em;
+ margin-bottom: 1em;
+ margin-left: 25%;
+ padding: 0;
+ width: 75%;
+ }
+ .dates ol li { padding : 0.3em 0; }
+
+ .dates ol li label {
+ width: 40%;
+ margin-top: -0.3em;
+ }
+ .dates ol li.fl1 {float: left; width: 30% ;}
+ .dates ol li.fl1 label {width: 40%; margin-top: -0.3em; }
+ .dates ol li.fl1 input { width: 50%; }
+
+
+ .periods ol {
+ margin-top: -0.3em;
+ margin-bottom: 1em;
+ margin-left: 25%;
+ padding: 0;
+ width: 75%;
+ }
+ .periods ol li { padding : 0.3em 0; }
+
+ .periods ol li label {
+ width: 40%;
+ margin-top: -0.3em;
+ }
+ .periods ol li.fl1 {float: left; width: 30% ;}
+ .periods ol li.fl1 label {width: 40%; margin-top: -0.3em; }
+ .periods ol li.fl1 input { width: 50%; }
+
+ .periods ol li.fl2 {float: left; width: 30% ;}
+ .periods ol li.fl2 label {width: 40%; margin-top: -0.3em;}
+ .periods ol li.fl2 input { width: 50%; }
+ a.add_fields {
+ margin-left: 25%;
+ color: #666;
+ padding-left: 18px;
+ background: url(image-path('user_interface/ui/add.png')) no-repeat 0% 50%;
+ }
+ a.remove_fields {
+ color: #666;
+ padding-left: 18px;
+ background: url(image-path('user_interface/ui/remove.png')) no-repeat 0% 50%;
+ }
+
}
diff --git a/app/views/exports/index.html.erb b/app/views/exports/index.html.erb
index 25db2e1ba..b7847b70e 100644
--- a/app/views/exports/index.html.erb
+++ b/app/views/exports/index.html.erb
@@ -1,5 +1,5 @@
<%= title_tag t('.title') %>
-
+<div class="warning"><%= t('.warning') %> </div>
<div class="page_info">
<span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @exports %>
</div>
diff --git a/app/views/file_validations/index.html.erb b/app/views/file_validations/index.html.erb
index e1416fa96..2e0cefbe8 100644
--- a/app/views/file_validations/index.html.erb
+++ b/app/views/file_validations/index.html.erb
@@ -1,5 +1,5 @@
<%= title_tag t('.title') %>
-
+<div class="warning"><%= t('.warning') %> </div>
<div class="pagination">
<div class="page_info">
<%= page_entries_info @file_validations %>
diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb
index 7e0d366a3..8469fbd7b 100644
--- a/app/views/imports/index.html.erb
+++ b/app/views/imports/index.html.erb
@@ -1,5 +1,5 @@
<%= title_tag t('.title') %>
-
+<div class="warning"><%= t('.warning') %> </div>
<div class="page_info">
<span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @imports %>
</div>
diff --git a/app/views/time_tables/_date_fields.erb b/app/views/time_tables/_date_fields.erb
new file mode 100644
index 000000000..5d24456a3
--- /dev/null
+++ b/app/views/time_tables/_date_fields.erb
@@ -0,0 +1,4 @@
+<%= f.inputs :class => 'dates nested-fields' do %>
+ <%= f.input :date, :as => :date_picker, :label => @time_table.human_attribute_name("date"), :wrapper_html => { :class => 'fl1' }%>
+ <%= link_to_remove_association t('actions.destroy'), f %>
+<% end %>
diff --git a/app/views/time_tables/_dates.html.erb b/app/views/time_tables/_dates.html.erb
index 47ae01710..663efec58 100644
--- a/app/views/time_tables/_dates.html.erb
+++ b/app/views/time_tables/_dates.html.erb
@@ -1,10 +1,6 @@
<ul class='dates'>
<% @time_table.dates.each do |tmd| %>
<li class="<%= (tmd.position%2==0) ? 'odd' : 'even' %>"><%= l tmd.date %>
- <div class="actions">
- <%= link_to t("actions.destroy"), referential_time_table_time_table_date_path(@referential, @time_table,tmd), :method => :delete, :confirm => t('time_tables.actions.destroy_date_confirm'), :class => "remove" %>
- </div>
-
</li>
<% end %>
</ul>
diff --git a/app/views/time_tables/_form.erb b/app/views/time_tables/_form.erb
index fbced7bd4..3325b97a5 100644
--- a/app/views/time_tables/_form.erb
+++ b/app/views/time_tables/_form.erb
@@ -17,6 +17,43 @@
<%= form.input :objectid, :required => !@time_table.new_record?, :input_html => { :disabled => !@time_table.new_record? } %>
<% end %>
+ <h3 class="time_table_dates">
+ <a class="dates"><%= @time_table.human_attribute_name("dates") %>
+ <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
+ <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
+ </a>
+ </h3>
+
+ <div class="dates content" id="dates_content">
+ <div id="dates">
+ <%= form.semantic_fields_for :dates do |p| %>
+ <%= render "date_fields", :f => p %>
+ <% end %>
+ </div>
+ <%= link_to_add_association t("time_tables.actions.add_date"), form, :dates ,
+ :"data-association-insertion-method" => "append",
+ :"data-association-insertion-node" => "div#dates" %>
+ </div>
+
+
+ <h3 class="time_table_periods">
+ <a class="periods"><%= @time_table.human_attribute_name("periods") %>
+ <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
+ <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
+ </a>
+
+ </h3>
+ <div class="periods content" id="periods_content">
+ <div id="periods">
+ <%= form.semantic_fields_for :periods do |p| %>
+ <%= render "period_fields", :f => p %>
+ <% end %>
+ </div>
+ <%= link_to_add_association t("time_tables.actions.add_period"), form, :periods ,
+ :"data-association-insertion-method" => "append",
+ :"data-association-insertion-node" => "div#periods"%>
+ </div>
+ <p/>
<%= form.actions do %>
<%= form.action :submit, :as => :button %>
<%= form.action :cancel, :as => :link %>
diff --git a/app/views/time_tables/_period_fields.erb b/app/views/time_tables/_period_fields.erb
new file mode 100644
index 000000000..120a526bb
--- /dev/null
+++ b/app/views/time_tables/_period_fields.erb
@@ -0,0 +1,5 @@
+<%= f.inputs :class => 'periods nested-fields' do %>
+ <%= f.input :period_start, :as => :date_picker, :label => @time_table.human_attribute_name("period_start"), :wrapper_html => { :class => 'fl1' }%>
+ <%= f.input :period_end, :as => :date_picker, :label => @time_table.human_attribute_name("period_end"), :wrapper_html => { :class => 'fl2' }%>
+ <%= link_to_remove_association t('actions.destroy'), f %>
+<% end %>
diff --git a/app/views/time_tables/_periods.html.erb b/app/views/time_tables/_periods.html.erb
index 9f3974735..1f0aea057 100644
--- a/app/views/time_tables/_periods.html.erb
+++ b/app/views/time_tables/_periods.html.erb
@@ -1,9 +1,6 @@
<ul class='periods'>
<% @time_table.periods.each do |tmp| %>
<li class='period'><%= t('time_tables.show.from')%> <%= l tmp.period_start %> <%= t('time_tables.show.to')%> <%= l tmp.period_end %>
- <div class="actions">
- <%= link_to t("actions.destroy"), referential_time_table_time_table_period_path(@referential, @time_table,tmp), :method => :delete, :confirm => t('time_tables.actions.destroy_period_confirm'), :class => "remove" %>
- </div>
</li>
<% end %>
</ul>
diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb
index 60eee8d04..3536dedae 100644
--- a/app/views/time_tables/show.html.erb
+++ b/app/views/time_tables/show.html.erb
@@ -70,18 +70,33 @@
<%= @time_table.creator_id %>
</p>
</div>
- <h3 class="dates"><%= t('.dates') %></h3>
- <%= render "dates" %>
- <h3 class="periods"><%= t('.periods') %></h3>
- <%= render "periods" %>
+ <h3 class="time_table_dates">
+ <a class="dates"><%= @time_table.human_attribute_name("dates") %>
+ <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
+ <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
+ </a>
+ </h3>
+
+ <div class="dates content">
+ <%= render "dates" %>
+ </div>
+
+ <h3 class="time_table_periods">
+ <a class="periods"><%= @time_table.human_attribute_name("periods") %>
+ <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
+ <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
+ </a>
+
+ </h3>
+ <div class="periods content">
+ <%= render "periods" %>
+ </div>
</div>
<% content_for :sidebar do %>
<ul class="actions">
<li><%= link_to t('time_tables.actions.edit'), edit_referential_time_table_path(@referential, @time_table), :class => "edit" %></li>
<li><%= link_to t('time_tables.actions.destroy'), referential_time_table_path(@referential, @time_table), :method => :delete, :confirm => t('time_tables.actions.destroy_confirm'), :class => "remove" %></li>
- <li><%= link_to t('time_tables.show.add_date'), new_referential_time_table_time_table_date_path(@referential, @time_table), :class => 'add' %></li>
- <li><%= link_to t('time_tables.show.add_period'), new_referential_time_table_time_table_period_path(@referential, @time_table), :class => 'add' %></li>
<br>
</ul>
<% end %>
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 4cc904bab..a9e742bd6 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,3 +1,4 @@
+# ENV["CHOUETTE_RUN_MIGRATIONS"] = "true"
ChouetteIhm::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
diff --git a/config/locales/exports.yml b/config/locales/exports.yml
index fa7fdfb8e..80468f96e 100644
--- a/config/locales/exports.yml
+++ b/config/locales/exports.yml
@@ -10,6 +10,7 @@ en:
all: All
index:
title: Exports
+ warning: ""
show:
report: Report
statuses:
@@ -82,6 +83,7 @@ fr:
all: Toutes
index:
title: Exports
+ warning: ""
show:
report: Rapport
statuses:
diff --git a/config/locales/file_validations.yml b/config/locales/file_validations.yml
index 50645dee9..96c2d60e8 100644
--- a/config/locales/file_validations.yml
+++ b/config/locales/file_validations.yml
@@ -2,6 +2,7 @@ en:
file_validations:
index:
title: Neptune Validation
+ warning: ""
edit:
title: "Edit the Validation"
show:
@@ -259,6 +260,7 @@ fr:
file_validations:
index:
title: Validation Neptune
+ warning: ""
edit:
title: "Editer la validation"
show:
diff --git a/config/locales/imports.yml b/config/locales/imports.yml
index ebf463886..c76377713 100644
--- a/config/locales/imports.yml
+++ b/config/locales/imports.yml
@@ -8,6 +8,7 @@ en:
title: New import
index:
title: Imports
+ warning: ""
show:
report: Report
statuses:
@@ -103,6 +104,7 @@ fr:
title: Nouvel import
index:
title: Imports
+ warning: ""
show:
report: Rapport
statuses:
diff --git a/config/locales/time_tables.yml b/config/locales/time_tables.yml
index d2fd44887..469875c1d 100644
--- a/config/locales/time_tables.yml
+++ b/config/locales/time_tables.yml
@@ -56,7 +56,7 @@ en:
creation_time: Created on
creator_id: Created by
dates: Application dates
- date: Le
+ date: On
periods: Application periods
period_start: From
period_end: to
@@ -81,6 +81,8 @@ fr:
destroy_confirm: Etes vous sûr de détruire ce calendrier ?
destroy_date_confirm: Etes vous sûr de détruire cette date ?
destroy_period_confirm: Etes vous sûr de détruire cette période ?
+ add_period: Ajouter une période
+ add_date: Ajouter une date
new:
title: Ajouter un calendrier
edit:
diff --git a/db/migrate/20120926144618_add_id_to_time_table_date.ninoxe_engine.rb b/db/migrate/20120926144618_add_id_to_time_table_date.ninoxe_engine.rb
new file mode 100644
index 000000000..35f1d8a2f
--- /dev/null
+++ b/db/migrate/20120926144618_add_id_to_time_table_date.ninoxe_engine.rb
@@ -0,0 +1,13 @@
+# This migration comes from ninoxe_engine (originally 20120926141405)
+class AddIdToTimeTableDate < ActiveRecord::Migration
+ def change
+ # active record can't add primary key after table creation
+ # must do SQL direct command
+ execute <<-SQL
+ ALTER TABLE time_table_dates ADD COLUMN id bigserial
+ SQL
+ execute <<-SQL
+ ALTER TABLE time_table_dates ADD CONSTRAINT time_table_dates_pkey PRIMARY KEY (id)
+ SQL
+ end
+end
diff --git a/db/migrate/20120926144619_add_id_to_time_table_period.ninoxe_engine.rb b/db/migrate/20120926144619_add_id_to_time_table_period.ninoxe_engine.rb
new file mode 100644
index 000000000..0211d49ac
--- /dev/null
+++ b/db/migrate/20120926144619_add_id_to_time_table_period.ninoxe_engine.rb
@@ -0,0 +1,13 @@
+# This migration comes from ninoxe_engine (originally 20120926141415)
+class AddIdToTimeTablePeriod < ActiveRecord::Migration
+ def change
+ # active record can't add primary key after table creation
+ # must do SQL direct command
+ execute <<-SQL
+ ALTER TABLE time_table_periods ADD COLUMN id bigserial
+ SQL
+ execute <<-SQL
+ ALTER TABLE time_table_periods ADD CONSTRAINT time_table_periods_pkey PRIMARY KEY (id)
+ SQL
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2895423a1..bf0284d15 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120905125251) do
+ActiveRecord::Schema.define(:version => 20120926144619) do
create_table "access_links", :force => true do |t|
t.integer "access_point_id", :limit => 8
@@ -176,8 +176,6 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
t.integer "choice_code"
end
- add_index "facilities_features", ["facility_id"], :name => "idx_facility_id"
-
create_table "file_validation_log_messages", :force => true do |t|
t.integer "file_validation_id"
t.string "key"
@@ -192,7 +190,7 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
create_table "file_validations", :force => true do |t|
t.string "status"
- t.string "options", :limit => 2000
+ t.string "options"
t.string "file_name"
t.string "file_type"
t.datetime "created_at"
@@ -212,13 +210,10 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
add_index "group_of_lines", ["objectid"], :name => "group_of_lines_objectid_key", :unique => true
create_table "group_of_lines_lines", :id => false, :force => true do |t|
- t.integer "group_of_line_id", :limit => 8, :null => false
- t.integer "line_id", :limit => 8, :null => false
+ t.integer "group_of_line_id", :limit => 8
+ t.integer "line_id", :limit => 8
end
- add_index "group_of_lines_lines", ["group_of_line_id"], :name => "idx_grli_gr"
- add_index "group_of_lines_lines", ["line_id"], :name => "idx_grli_li"
-
create_table "import_log_messages", :force => true do |t|
t.integer "import_id"
t.string "key"
@@ -260,11 +255,10 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
add_index "journey_patterns", ["objectid"], :name => "journey_patterns_objectid_key", :unique => true
create_table "journey_patterns_stop_points", :id => false, :force => true do |t|
- t.integer "journey_pattern_id", :limit => 8, :null => false
- t.integer "stop_point_id", :limit => 8, :null => false
+ t.integer "journey_pattern_id", :limit => 8
+ t.integer "stop_point_id", :limit => 8
end
- add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "idx_jpsp_jpid"
add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "index_journey_pattern_id_on_journey_patterns_stop_points"
create_table "lines", :force => true do |t|
@@ -361,9 +355,6 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
t.integer "line_id", :limit => 8
end
- add_index "routing_constraints_lines", ["line_id"], :name => "idx_rcli_li"
- add_index "routing_constraints_lines", ["stop_area_id"], :name => "idx_rcli_st"
-
create_table "stop_areas", :force => true do |t|
t.integer "parent_id", :limit => 8
t.string "objectid", :null => false
@@ -420,7 +411,7 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
add_index "time_slots", ["objectid"], :name => "time_slots_objectid_key", :unique => true
- create_table "time_table_dates", :id => false, :force => true do |t|
+ create_table "time_table_dates", :force => true do |t|
t.integer "time_table_id", :limit => 8, :null => false
t.date "date"
t.integer "position", :null => false
@@ -428,7 +419,7 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
add_index "time_table_dates", ["time_table_id"], :name => "index_time_table_dates_on_time_table_id"
- create_table "time_table_periods", :id => false, :force => true do |t|
+ create_table "time_table_periods", :force => true do |t|
t.integer "time_table_id", :limit => 8, :null => false
t.date "period_start"
t.date "period_end"
@@ -450,8 +441,8 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
add_index "time_tables", ["objectid"], :name => "time_tables_objectid_key", :unique => true
create_table "time_tables_vehicle_journeys", :id => false, :force => true do |t|
- t.integer "time_table_id", :limit => 8, :null => false
- t.integer "vehicle_journey_id", :limit => 8, :null => false
+ t.integer "time_table_id", :limit => 8
+ t.integer "vehicle_journey_id", :limit => 8
end
add_index "time_tables_vehicle_journeys", ["time_table_id"], :name => "index_time_tables_vehicle_journeys_on_time_table_id"
@@ -501,12 +492,8 @@ ActiveRecord::Schema.define(:version => 20120905125251) do
t.time "waiting_time"
t.time "elapse_duration"
t.time "headway_frequency"
- t.integer "position", :limit => 8
- t.boolean "is_departure", :default => false
- t.boolean "is_arrival", :default => false
end
- add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_point_id"
add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_pointid"
add_index "vehicle_journey_at_stops", ["vehicle_journey_id"], :name => "index_vehicle_journey_at_stops_on_vehicle_journey_id"