Migration between versions

Hi

how to migrate in between versions ?
suppose if i have version 1-76 .

if i want to revert from 57-65 then what should i do ?without affecting
data of migrations from 66-76.Please help

Sijo

‘rake db:migrate VERSION=x’ (where ‘x’ is the migration number)

Is it correct?Because rake db:migrate VERSION=57(mycase) will drop all
tables from 76-58…So my data in 66-76 will be lost.That is not neede.I
have to preserve data of 66-76

I’m not sure if it is possible to do what you want using rake. Generally
speaking in the development environment, while data loss can be
inconvenient
the data is rarely considered to be crucial - the critical data is what
is
used in the production environment.

If you really do have to save what you have in the tables that would be
lost, you can backup the data from the database and then restore it once
rake recreates the empty tables. The method to do this depends on which
database platform you are using, with MySQL for example you would use
mysqldump.

Gareth


Gareth Howells, CertHE (Dunelm), BCS
CEO, GForce Industries

garethATgforce-industriesDOTcoDOTuk
07862725134

GForce Industries
86, Warwick Avenue,
Quorn,
Loughborough,
LEICS.
LE12 8HE
----- Original Message -----
From: “Sijo Kg” [email protected]
To: [email protected]
Sent: Thursday, February 07, 2008 9:35 AM
Subject: [Rails] Re: migration between versions

Hi
Thanks