preserving data in production

I've made some pretty major changes to my applications structure,
including regenerating the migrations. Rather than adding a column here
and there I just did this...

rake db:migrate VERSION=0

Then edited my migration files with the new column names and types I
required (only a couple of tables affected), I've then done...

rake db:migrate

and that's brought in all the changes, it blatted all the data of course
but the schema is now where I want it.

So what I've described above is all on my mac locally (the dev site).

So the thing is, what can I now do in production to preserve all the
data?

Any tips for me?

instead of doing what you did, create migrations that add, remove or change columns/tables as required.

Fred

I thought I might get that answer!
Being that I've done it though, any tips?

Revert the changes :slight_smile:

Fred

OK, thanks, well not an option to revert, gone too far.

Thing is I have various tables in production, some of which (most) are
easy to recreate if I blow the data out. Question is, there are some
tables blog entries and page contents that I'd like to preserve the data
for, I haven't touched the migrations for these.

Can I do this?

bb.

OK, thanks, well not an option to revert, gone too far.

Thing is I have various tables in production, some of which (most) are
easy to recreate if I blow the data out. Question is, there are some
tables blog entries and page contents that I'd like to preserve the
data
for, I haven't touched the migrations for these.

You can probably hack around to only run down/up on some migrations.
don't know if there's anything builtin for that.

You can probably hack around to only run down/up on some migrations.
don't know if there's anything builtin for that.

That's what I figured might be possible, any clues as to how to do this
being as I've got 16 migration files in development, under svn control?