On 11 Apr 2008, at 23:25, Michael Koziarski wrote:
> >> Why is it not a case of just removing the "if mysql" bits ? I'm happy >> to spend some time looking at this but I don't think I get what's to >> be done. > > That's about all there is to it, but after you remove it you have to > run the tests, and catch any differences (implicit or otherwise) > between the schema.rb definition and the schema.sql. I've had a bash at this, and I've got things in a state where things pass in mysql (obviously) and sqlite3 and postgresql. I haven't the faintest clue what will happen with other databases, mostly because I don't have them installed and know even less about those than the rest. There are some issues I've had along the way though. The schemas aren't quite identical to what they were before, for example the sql files for postgres defined a lot of strings has having length 50 (not for any particular reason as far as I can tell) whereas schema.rb defines them as having length 255. Another one was People.first_name is not null in schema.rb but allows null in postgres' sql file, which caused a failing test (In that case i fixed up the test). The main thing that is a bit fiddly is how to deal with database differences. So for example postgres has a bunch of tables that are used to test some postgres specific stuff. Right now at the bottom of schema.rb there's a case adapter_name when 'Postgres' do some postgres stuff ... end and there's also one at the top of the file which can be used for adapter specific setup. I haven't decided yet if maybe some of that would be better factored out and put somewhere else (where ?) Anyway, what i've got so far is over at http://github.com/fcheung/rails/tree/master , thoughts appreciated (if the git stuff is messed up it's probably because I don't have the faintest foggiest clue what I'm doing - I've not used git before, but loving it so far!) Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
