Hi all, Currently I''m using MySQL on my development machine and it works fine. However, recently I''ve been trying to put together my tools on a USB key so that I can work on my project wherever I happen to be. So far I''ve gotten Eclipse set up with everything (svn and all) except the database. The problem is that MySQL is *huge*. I have a few InnoDB tables (read: get that MyISAM crap away from me) in my setup and to run all of those off my USB key is just... bad. MySQL itself takes up a rather large amount of space, and then the databases aren''t light either. This normally isn''t a problem, but when you''re working with about 384M and you want room for stuff besides the development environment it''s bad. 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. Any ideas? Thanks. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> 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 http://techno-weenie.net
Well, I only really need to deal with Windows as far as the stick goes. And it is too an iPod. It''s just a shuffle and I''d like some music too :) I could use my 40g, but that would involve reformatting it FAT32. Maybe at some point I will. I guess I''ll just run MySQL off the stick for now. It''s not actually that big if you delete everything but the single binary you''re using, and I guess I''ll just use the local disk for storage. I prefer using my laptop but we just recently instated a policy down here about anything with any wireless capability at all, so now I''m stuck not using TextMate :( Oh well. Thanks :) On 10/9/05, Julian ''Julik'' Tarkhanov <listbox-RY+snkucC20@public.gmane.org> wrote:> > > On 8-okt-2005, at 20:13, Patrick McCafferty wrote: > > > Hi all, > > > > Currently I''m using MySQL on my development machine and it works > > fine. However, recently I''ve been trying to put together my tools > > on a USB key so that I can work on my project wherever I happen to > > be. So far I''ve gotten Eclipse set up with everything (svn and all) > > except the database. > > > > The problem is that MySQL is *huge*. I have a few InnoDB tables > > (read: get that MyISAM crap away from me) in my setup and to run > > all of those off my USB key is just... bad. MySQL itself takes up a > > rather large amount of space, and then the databases aren''t light > > either. This normally isn''t a problem, but when you''re working with > > about 384M and you want room for stuff besides the development > > environment it''s bad. > > > > 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. > > Switch to ActiveSchema and hold your DDLs as migration files. After > that, run your development with SQLite as "in-memory" store (wicked > fast but your app will always be startin gup in it''s "blank" state). > Note that to keep all onmemory stick you will need to have binaries > of SQLite (and all the rest) for all the platforms you plan to be > using your "sticky" (sic!) Rails app on. > > SQLite (IMO) is not fit for development because you cannot modify > table structure on the fly without dropping tables. What I think is > the best option for you is to buy a bigger memory stick (or an iPod, > for that matter :-) > > Besideds I am avoiding SQLite because of the incompatibilies between > different BerkeleyDB formats I have experienced in the past. > But maybe it''s just me. > -- > Julian "Julik" Tarkhanov > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Well, that''s good to know too :) Thanks for that, as well. On 10/9/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > 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 > http://techno-weenie.net >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Patrick McCafferty wrote:> 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.You may want to look at Instiki-AR branch, it uses ERB to generate a schema for Postgres, MySQL or SQLite in a compatible way. Of course, your original schema is limited to datatypes and declarations that all three databases can support. If you use SQLite, I strongly recommend you to use SQLite 3 (better compatibility) and put your SQLite databases, at least the one for unit tests, on a RAMDrive (three times faster). Best regards, Alexey Verkhovsky