aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorXinhui2017-01-04 11:39:48 +0100
committerXinhui2017-01-04 11:39:48 +0100
commitea69fbeb8bbb981e09b7f68da77fa63902d9e468 (patch)
treef9a13dfef364ca1d78509e04e532b9f1bdd3accd /db
parentf40d4c1940426124bb4a8464b707cd673d9d5ee6 (diff)
downloadchouette-core-ea69fbeb8bbb981e09b7f68da77fa63902d9e468.tar.bz2
Restore migration 20161208112130_create_routing_constraint_zones
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161208112130_create_routing_constraint_zones.rb20
1 files changed, 6 insertions, 14 deletions
diff --git a/db/migrate/20161208112130_create_routing_constraint_zones.rb b/db/migrate/20161208112130_create_routing_constraint_zones.rb
index 2c1ee8248..0fa1ef1ae 100644
--- a/db/migrate/20161208112130_create_routing_constraint_zones.rb
+++ b/db/migrate/20161208112130_create_routing_constraint_zones.rb
@@ -1,19 +1,11 @@
class CreateRoutingConstraintZones < ActiveRecord::Migration
- def up
- unless table_exists? :routing_constraint_zones
- create_table :routing_constraint_zones do |t|
- t.string :name
- t.integer :stop_area_ids, array: true
- t.belongs_to :line, index: true
+ def change
+ create_table :routing_constraint_zones do |t|
+ t.string :name
+ t.integer :stop_area_ids, array: true
+ t.belongs_to :line, index: true
- t.timestamps
- end
- end
- end
-
- def down
- if table_exists? :routing_constraint_zones
- drop_table :routing_constraint_zones
+ t.timestamps
end
end
end