Re: SQLite on development, MySQL on production?

Rick Olson
Sat, 08 Oct 2005 18:27:49 -0000

>  I''m looking into SQLite because it seems closer to what I want.
However,
> I''d still like the option for using MySQL on my personal dev
machine, as I
> don''t think there are too many GUI apps available for SQLite on OS
X. A
> couple problems I see with this are that the DDL for SQLite and MySQL are
> pretty different, so it''s not a simple matter of dumping
db/development.sql
> into SQLite to create the schema. But of course this problem will occur in
> reverse as well - how do I keep this in sync without manually editing it
> after a checkout? SQLFairy is something of an option except then I have to
> carry Perl on my key as well.
>
>  Even if I move to SQLite on all my development machines I still have this
> problem with deployment, since I''m definitely not going to use it
for
> production.

I''m not sure if the latest beta gems have it, but the schema dumper
that was recently added is very nice.  Use migrations or raw sql to
setup the database and run ''rake db_schema_dump''.  It provides
a
db-agnostic schema that you can then import with ''rake
db_schema_import''.

If you''re not on edge rails, than Rails 1.0 will solve your problems.

--
rick