aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorLuc Donnet2017-09-14 09:55:48 +0200
committerLuc Donnet2017-09-14 09:55:48 +0200
commit2fa3be1518da4f471d614832f80526e074983195 (patch)
treeacbf2b8d95c3c572142d9c2b13f3704ce9db4304 /db
parente11810f865239f5565c1b97c7e8da5f2b3108d29 (diff)
downloadchouette-core-2fa3be1518da4f471d614832f80526e074983195.tar.bz2
Change wayback values in route Refs #3395 @4
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170913074922_change_wayback_route_values.rb12
-rw-r--r--db/schema.rb2
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20170913074922_change_wayback_route_values.rb b/db/migrate/20170913074922_change_wayback_route_values.rb
new file mode 100644
index 000000000..a547cbd55
--- /dev/null
+++ b/db/migrate/20170913074922_change_wayback_route_values.rb
@@ -0,0 +1,12 @@
+class ChangeWaybackRouteValues < ActiveRecord::Migration
+ def up
+ execute "UPDATE routes SET wayback = 'outbound' WHERE routes.wayback = 'straight_forward';"
+ execute "UPDATE routes SET wayback = 'inbound' WHERE routes.wayback = 'backward';"
+ end
+
+ def down
+ execute "UPDATE routes SET wayback = 'straight_forward' WHERE routes.wayback = 'outbound';"
+ execute "UPDATE routes SET wayback = 'backward' WHERE routes.wayback = 'inbound';"
+ end
+
+end
diff --git a/db/schema.rb b/db/schema.rb
index 9207590b5..39162b447 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: 20170907082913) do
+ActiveRecord::Schema.define(version: 20170913074922) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"