Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

magic comment should be included when dumping db schema #1592

Closed
pwim opened this Issue · 4 comments

5 participants

@pwim

I have a table that includes a UTF-8 default value for a column

ActiveRecord::Schema.define(:version => 20110609012941) do
  create_table "invoices", :force => true do |t|
    t.string   "recipient_title",     :default => "御中"
  end
end

Because the dumped schema does not include an encoding magic comment, this creates an error. It should have a magic comment indicating the encoding following from the db encoding.

@tenderlove tenderlove was assigned
@pixeltrix
Owner

Shouldn't it be the encoding of the database connection? Might not always be UTF-8.

@pixeltrix
Owner

Sorry - got confused between the pull request and issue :-)

@dmitriy-kiriyenko

I don't think it should be the encoding of database connection. It is the adapter who should care about the database connection. +1 for magic comment in schema.rb. Can find a time to do it if agreed.

@pksunkara

Can I work on writing a fix for this issue?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.