Skip to content

Commit

Permalink
fix to upgrade problem 0.23 -> 1.0.x assay_type_id
Browse files Browse the repository at this point in the history
for some reason, assay_type_id is missing on assays for a 0.23 install. a migration exists that tries to remove it that fails, however worked on earlier installations.
Now added a check that the field exists as part of the migration.
same for technology_type_id
  • Loading branch information
stuzart committed Apr 1, 2016
1 parent a1e872d commit b6507b2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
class RemoveAssayAndTechTypeIdFromAssay < ActiveRecord::Migration
def up
remove_column :assays,:assay_type_id
remove_column :assays, :technology_type_id
if column_exists? :assays, :assay_type_id
remove_column :assays,:assay_type_id
end
if column_exists? :assays, :technology_type_id
remove_column :assays, :technology_type_id
end
end

def down
Expand Down

0 comments on commit b6507b2

Please sign in to comment.