Skip to content

Commit

Permalink
[#643] (comments) don't break migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Apr 20, 2010
1 parent 13fffb2 commit dfa54b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hobofields/lib/hobo_fields/field_spec.rb
Expand Up @@ -81,8 +81,12 @@ def different_to?(col_spec)
# we should be able to use col_spec.comment, but col_spec has
# a nil table_name for some strange reason.
begin
col_comment = ActiveRecord::Base.try.column_comment(col_spec.name, model.table_name)
col_comment != nil && col_comment != comment
if model.table_exists?
col_comment = ActiveRecord::Base.try.column_comment(col_spec.name, model.table_name)
col_comment != nil && col_comment != comment
else
true
end
end ||
begin
check_attributes = [:null, :default]
Expand Down

0 comments on commit dfa54b3

Please sign in to comment.