Skip to content

Commit

Permalink
Merge pull request #3 from pik/master
Browse files Browse the repository at this point in the history
Whitespace and sort order for Dumper Middleware
  • Loading branch information
ronen committed Jan 16, 2016
2 parents cc93199 + 29e4b4a commit ba14327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/schema_plus/enums/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ module Initial
module Postgresql

def after(env)
env.connection.enums.each do |schema, name, values|
env.connection.enums.sort_by {|k| k[1] }.each do |schema, name, values|
params = [name.inspect]
params << values.map(&:inspect).join(', ')
params << ":schema => #{schema.inspect}" if schema != 'public'

env.initial << "create_enum #{params.join(', ')}"
env.initial << " create_enum #{params.join(', ')}"
end
end
end
Expand Down

0 comments on commit ba14327

Please sign in to comment.