Moving to another database system

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.

On Wed, Sep 23, 2009 at 7:09 PM, Aldric G.
[email protected] wrote:

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 :wink:

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.

Aldric G. 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,but

Yes. 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
[email protected]