activeuuid icon indicating copy to clipboard operation
activeuuid copied to clipboard

Schema dumper

Open agios opened this issue 11 years ago • 4 comments

It will add non-integer primary key entries to the schema dump

agios avatar Dec 28 '12 12:12 agios

It is foken osom! I could not even bring myself to do this patch. It's sad that AR dumper source is so old and unpatchable (

pyromaniac avatar Dec 28 '12 12:12 pyromaniac

It doesn't work for me.

Rails 3.2.9 , Postgresql 8.4

db/schema.rb:

ActiveRecord::Schema.define(:version => 20121224130418) do
  create_table "objects", :id => false, :force => true do |t|
    t.string   "uuid",        :limit => nil,                                :null => false
  end
end

As you can see it has t.string instead of t.uuid

paneq avatar Dec 31 '12 09:12 paneq

That's odd, I currently use it on 3.2.9 myself. What gems do you have installed? Maybe another also overrides schema dumper?

agios avatar Jan 04 '13 15:01 agios

It didn't work for me either. The uuid columns are mistaken as string columns and it requires a peek at the sql column type to figure it out.

I've got a modified version here.

schema_dumper.rb

Let me know if it works (@paneq)

juni0r avatar Jan 08 '13 02:01 juni0r