Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Tom Copeland
RE: Bootstrap for new developers [ reply ]  
2009-10-07 15:32
Ah cool, OK, sounds good. Well, for some values of "good", anyway :-)

Yours,

Tom

By: James Tucker
RE: Bootstrap for new developers [ reply ]  
2009-10-05 10:11
http://github.com/rails/rails/blob/2-3-stable/activerecord/lib/active_record/schema_dumper.rb#L82-92

It appears this may be related to the adapter in use. It may take some time for me to try and replicate this setup and develop a workaround.

By: James Tucker
RE: Bootstrap for new developers [ reply ]  
2009-10-05 10:04
Ah ha!

It appears the sql dumper "does the right thing".

I shall investigate some more, there should be a way to ensure the db is constructed purely from the sql dump, rather than from schema.rb. If this is the case, it's purely a process problem in what rake tasks to use / may require an additional task aggregating this process / some documentation for said process.

By: Tom Copeland
RE: Bootstrap for new developers [ reply ]  
2009-10-05 01:47
I can see the error when I do a "rake db:schema:dump"... but then when I run "rake" it runs the tests fine. Weird... not sure what's going wrong. I posted some output and whatnot in #rubyforge...

Yours,

Tom

By: James Tucker
Bootstrap for new developers [ reply ]  
2009-10-04 01:24
Tom kindly added a schema.rb for me which aided immensely, however I still had to do a bit of work to get the tests running (disclaimer: total hacks (not in commit)): http://pastie.textmate.org/private/8a0pnox394xsgnkflduxg

As far as I've researched, it appears this is a long standing missing feature from the rails schema dumper - support for dumping custom autoincrement/serial columns.

It'd also be nice for rake default to do the right thing from the ground up. I'm more than happy to supply further patches for these things.

The id columns issue is one that may bear some discussion, as if the schema changes in production (due to say, a gforge update), I am unsure how it is best to 'correct' schema.rb, other than patching rails, or rolling our own things. Another potential hacky approach is to add these in a migration.

I'm certain there are other options I have not considered, so have at it.