提交 036d3e1c 编写于 作者: A Aaron Patterson

Merge pull request #8431 from joshsusser/schemadump

dump schema.rb without :version option
...@@ -39,8 +39,6 @@ def initialize(connection) ...@@ -39,8 +39,6 @@ def initialize(connection)
end end
def header(stream) def header(stream)
define_params = @version ? "version: #{@version}" : ""
if stream.respond_to?(:external_encoding) && stream.external_encoding if stream.respond_to?(:external_encoding) && stream.external_encoding
stream.puts "# encoding: #{stream.external_encoding.name}" stream.puts "# encoding: #{stream.external_encoding.name}"
end end
...@@ -58,7 +56,7 @@ def header(stream) ...@@ -58,7 +56,7 @@ def header(stream)
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(#{define_params}) do ActiveRecord::Schema.define do
HEADER_RUBY HEADER_RUBY
stream.puts header_text stream.puts header_text
...@@ -75,7 +73,7 @@ def migrations(stream) ...@@ -75,7 +73,7 @@ def migrations(stream)
all_migrations.each do |migration| all_migrations.each do |migration|
stream.puts(migration.schema_line(" ")) stream.puts(migration.schema_line(" "))
end end
stream.puts(" end") stream.puts(" end\n\n")
end end
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册