aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
authorLuc Donnet2017-12-01 12:35:00 +0100
committerLuc Donnet2017-12-01 12:35:00 +0100
commit1bdb0765df3a172daedaa0e86dd1cdce328489fb (patch)
tree9010320865a03ac505e2f2d4685e5a2962ba724e /db/migrate
parent8e80415f70e0c181643e522976b1cf8bf9f9abfd (diff)
downloadchouette-core-1bdb0765df3a172daedaa0e86dd1cdce328489fb.tar.bz2
Fix objectid_format creation in migration with existence test.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20171109100955_add_object_id_format_to_workbenches.rb2
-rw-r--r--db/migrate/20171109101523_add_object_id_format_to_referential.rb2
-rw-r--r--db/migrate/20171109101545_add_object_id_format_to_line_referential.rb2
-rw-r--r--db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb b/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb
index 0e5e57643..f7e7452e1 100644
--- a/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb
+++ b/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb
@@ -1,5 +1,5 @@
class AddObjectIdFormatToWorkbenches < ActiveRecord::Migration
def change
- add_column :workbenches, :objectid_format, :string
+ add_column :workbenches, :objectid_format, :string unless column_exists? :workbenches, :objectid_format
end
end
diff --git a/db/migrate/20171109101523_add_object_id_format_to_referential.rb b/db/migrate/20171109101523_add_object_id_format_to_referential.rb
index fed630b75..0a28fb10a 100644
--- a/db/migrate/20171109101523_add_object_id_format_to_referential.rb
+++ b/db/migrate/20171109101523_add_object_id_format_to_referential.rb
@@ -1,5 +1,5 @@
class AddObjectIdFormatToReferential < ActiveRecord::Migration
def change
- add_column :referentials, :objectid_format, :string
+ add_column :referentials, :objectid_format, :string unless column_exists? :referentials, :objectid_format
end
end
diff --git a/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb b/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb
index 5d2fc9f4f..6578de73f 100644
--- a/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb
+++ b/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb
@@ -1,5 +1,5 @@
class AddObjectIdFormatToLineReferential < ActiveRecord::Migration
def change
- add_column :line_referentials, :objectid_format, :string
+ add_column :line_referentials, :objectid_format, :string unless column_exists? :line_referentials, :objectid_format
end
end
diff --git a/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb b/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb
index ffa77e2ed..71c7d662a 100644
--- a/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb
+++ b/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb
@@ -1,5 +1,5 @@
class AddObjectIdFormatToStopAreaReferential < ActiveRecord::Migration
def change
- add_column :stop_area_referentials, :objectid_format, :string
+ add_column :stop_area_referentials, :objectid_format, :string unless column_exists? :stop_area_referentials, :objectid_format
end
end