Rails 2 to Rails 3 mysql migration?

I have an old rails project that is currently in Rails 2.3

I’m about to undertake updating the project to Rails 3.2.

The old project’s production server is on mysql 5.0 and has a medium
size database (not huge, but certainly big enough that I need to keep
the data after I upgrade the app).

If I do a modern deployment of Rails 3.2 (apache and latest stable mysql
on latest suse linux) I’m wondering if I will be able to just copy the
db over from the old server, or if there will be a need for some sort of
a migration?

Any info on what I’m up against there will be much appreciated.

Thanks!

On 13 September 2012 21:41, Jeff P. [email protected] wrote:

db over from the old server, or if there will be a need for some sort of
a migration?

Any info on what I’m up against there will be much appreciated.

In that situation I would use mysqldump to get a dump of the db and
create the new one from that. There may well be better ways however.

Colin

Colin L. wrote in post #1075905:

On 13 September 2012 21:41, Jeff P. [email protected] wrote:

db over from the old server, or if there will be a need for some sort of
a migration?

Any info on what I’m up against there will be much appreciated.

In that situation I would use mysqldump to get a dump of the db and
create the new one from that. There may well be better ways however.

Colin

Thanks Colin!

This is sort of:
binary data → long list of SQL statements
long list of SQL statements → binary data using new version of mySQL

yes?

Is this primarily to solve any compatibility issues between versions of
mySqL rather than from rails 2.x to rails 3.x?

thanks!

Colin L. wrote in post #1075952:

On 13 September 2012 22:20, Jeff P. [email protected] wrote:

Colin

Thanks Colin!

This is sort of:
binary data → long list of SQL statements
long list of SQL statements → binary data using new version of mySQL

yes?

yes

Is this primarily to solve any compatibility issues between versions of
mySqL rather than from rails 2.x to rails 3.x?

Yes, rails should not care which version of mysql you are using. …
Colin

Thanks again Colin. I’m left still with one question though…are there
any specific differences in Rails from 2.x to 3.x which result in
important db content differences and non-compatible databases? (not to
do with the other parts of the environment, but specifically the way
that rails uses the database).

Thanks!

On 14 September 2012 15:17, Jeff P. [email protected] wrote:

yes?
Thanks again Colin. I’m left still with one question though…are there
any specific differences in Rails from 2.x to 3.x which result in
important db content differences and non-compatible databases? (not to
do with the other parts of the environment, but specifically the way
that rails uses the database).

Not that I can think of, but you will no doubt find out as you do the
upgrade :slight_smile: If you google for how to upgrade from 2 to 3 you will find
numerous guides on how to do that. Look through those to see if there
is any reference to database differences.

Colin

On 13 September 2012 22:20, Jeff P. [email protected] wrote:

Colin

Thanks Colin!

This is sort of:
binary data → long list of SQL statements
long list of SQL statements → binary data using new version of mySQL

yes?

yes

Is this primarily to solve any compatibility issues between versions of
mySqL rather than from rails 2.x to rails 3.x?

Yes, rails should not care which version of mysql you are using. As a
side note I use this as a way of backing up the database (by backing
up the sql statements) as an emergency fallback in case the binary
backup fails for some reason. I am not sure there is a good logical
argument for this but it just seems like a good idea to have something
one can actually read as a backup.

Colin