File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -373,8 +373,13 @@ def columns(table_name, name = nil)
373373 AND constraint_column_usage.column_name = columns.column_name
374374 )
375375 WHERE columns.TABLE_NAME = '#{ table_name } '
376- ORDER BY columns.ordinal_position
377376 }
377+ #Shawn Balestracci 2008-10-01 There's some debate in how the columns should be sorted. I am choosing to leave them unsorted as that was done in the
378+ #Rails 1.x adapter
379+ #add above the brace ORDER BY columns.ordinal_position
380+ #or ORDER BY columns.column_name
381+ #if you want them sorted differently.
382+
378383 result = select ( sql , name , true )
379384 result . collect do |column_info |
380385 # Remove brackets and outer quotes (if quoted) of default value returned by db, i.e:
You can’t perform that action at this time.
0 commit comments