Ticket #11561: schema_statements.rb.patch
| File schema_statements.rb.patch, 1.0 kB (added by nwiger, 3 months ago) |
|---|
-
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
old new 281 281 282 282 def add_column_options!(sql, options) #:nodoc: 283 283 sql << " DEFAULT #{quote(options[:default], options[:column])}" if options_include_default?(options) 284 sql << " NOT NULL" if options[:null] == false 284 # must explcitly check for :null to allow change_column to work on migrations 285 if options.has_key? :null 286 if options[:null] == false 287 sql << " NOT NULL" 288 else 289 sql << " NULL" 290 end 291 end 285 292 end 286 293 287 294 # SELECT DISTINCT clause for a given set of columns and a given ORDER BY clause.