Skip to content
Browse files

default writing the schema file as utf-8

  • Loading branch information...
1 parent 5d7ed7a commit 3676af404d3c8ae869119f0ca093e0879a67c585 @tenderlove tenderlove committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  activerecord/lib/active_record/railties/databases.rake
3  activerecord/lib/active_record/railties/databases.rake
@@ -332,7 +332,8 @@ namespace :db do
desc "Create a db/schema.rb file that can be portably used against any DB supported by AR"
task :dump => :environment do
require 'active_record/schema_dumper'
-['SCHEMA'] || "#{Rails.root}/db/schema.rb", "w") do |file|
+ filename = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
+, "w:utf-8") do |file|
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)

0 comments on commit 3676af4

Please sign in to comment.
Something went wrong with that request. Please try again.