So, I developed what I considered a mini application for my department back in June. I used SQLite3. The file is still very small - about 2.5 megs - but I''d like to move to something else which supports multiple simultaneous read/writes better than SQLite3. What do I need to do? Clearly, rake will be my friend, but I haven''t used it much. I''m sure I''ll need a rake db:schema:dump, but then.. what? how do I tell the new database to get on with it, and then import all the data? This would be done at a time when no transactions are to occur. Of course. -- Posted via http://www.ruby-forum.com/.
On Wed, Sep 23, 2009 at 7:09 PM, Aldric Giacomoni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > So, I developed what I considered a mini application for my department > back in June. I used SQLite3. The file is still very small - about 2.5 > megs - but I''d like to move to something else which supports multiple > simultaneous read/writes better than SQLite3. > What do I need to do? Clearly, rake will be my friend, but I haven''t > used it much. > I''m sure I''ll need a rake db:schema:dump, but then.. what? how do I tell > the new database to get on with it, and then import all the data? > > This would be done at a time when no transactions are to occur. Of > course.Hi Aldric, You can do rake db:schema:dump to dump to db/schema.rb and do rake db:schema:load to load the file. When in doubt, do a rake --tasks. You will see all the tasks available Regards, Fidel.
What? No pre-chewed answer for me? I have to go read the docs? What ignominy is this? Alright - thanks ;) -- Posted via http://www.ruby-forum.com/.
Aldric Giacomoni wrote:> So, I developed what I considered a mini application for my department > back in June. I used SQLite3. The file is still very small - about 2.5 > megs - but I''d like to move to something else which supports multiple > simultaneous read/writes better than SQLite3.Yeah. As I understand, SQLite doesn''t know from concurrency. My strong recommendation would be for PostgreSQL.> What do I need to do? Clearly, rake will be my friend, but I haven''t > used it much. > I''m sure I''ll need a rake db:schema:dump,butYes. You could just run all the old migrations, but this is no longer recommended.> but then.. what? how do I tell > the new database to get on with it,rake db:schema:load> and then import all the data? > > This would be done at a time when no transactions are to occur. Of > course.For data interchange, you can either use the DB''s native export/import capabilities or something like yaml_db. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
yaml_db is really quite handy! Thanks. One word of warning: as it uses Rails, it''s not particularly fast. Not recommended if downtime is not a good idea. But, as far as making life easy for the admin.. Holy wow. -- Posted via http://www.ruby-forum.com/.