Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Schema dumper should emit ":default => false" if the default for a co…

…lumn is false

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit d364164763cd4e8868e47f4093ec8e329a33dbc4 1 parent f510b09
@jamis jamis authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/schema_dumper.rb
View
4 activerecord/lib/active_record/schema_dumper.rb
@@ -59,7 +59,7 @@ def table(table, stream)
next if column.name == "id"
stream.print " t.column #{column.name.inspect}, #{column.type.inspect}"
stream.print ", :limit => #{column.limit.inspect}" if column.limit != @types[column.type][:limit]
- stream.print ", :default => #{column.default.inspect}" if column.default
+ stream.print ", :default => #{column.default.inspect}" if !column.default.nil?
stream.print ", :null => false" if !column.null
stream.puts
end
@@ -80,4 +80,4 @@ def indexes(table, stream)
stream.puts unless indexes.empty?
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.