aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorZog2018-04-13 11:06:27 +0200
committerZog2018-04-13 11:06:27 +0200
commit13087614ceb0e9e3a604cd08a023f11cd0567bea (patch)
tree530f9cca1642fedc0c8a3ece201357ba6c4762b7 /db
parent94090e82bfb5f875f70aa1e8bffb8a51724eb760 (diff)
downloadchouette-core-13087614ceb0e9e3a604cd08a023f11cd0567bea.tar.bz2
Refs #6536; Cleanup value passed for secondary_company_ids by the lines form6536-fix-lines-form
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180413082929_clean_lines_secondary_companies.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate/20180413082929_clean_lines_secondary_companies.rb b/db/migrate/20180413082929_clean_lines_secondary_companies.rb
new file mode 100644
index 000000000..4c5659e8f
--- /dev/null
+++ b/db/migrate/20180413082929_clean_lines_secondary_companies.rb
@@ -0,0 +1,5 @@
+class CleanLinesSecondaryCompanies < ActiveRecord::Migration
+ def up
+ Chouette::Line.where("secondary_company_ids = '{NULL}'").update_all secondary_company_ids: nil
+ end
+end