Permalink
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...
jamis committed Oct 5, 2005
1 parent f510b09 commit d364164763cd4e8868e47f4093ec8e329a33dbc4
Showing with 2 additions and 2 deletions.
  1. +2 −2 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

0 comments on commit d364164

Please sign in to comment.