Parijat,

Follow the doc given by Tom.
Then, once you understand, just remember that for creating the
migration classes correctly you will have to do that in the correct
order:
1 - your schema yml files and your database structure should match
2 - update the classes to match your schema yml by doing a
doctrine:build --all-classes
3 - modify your schema yml files according to your needs
4 - run the task doctrine:generate-migrations-diff. This is gonna
check the differences between your model files and your schema yml
files and create the migration classes for you that will help you
migrate the database. That is why it's important that at the
beginning, your classes, your schema and your db match (happens when
you do step 1 and 2)
5 - once the migration classes are generated, you can try to run the
migration by doctrine:migrate
6 - if it works, update your classes to match the new schema yml files
(doctrine:build --all-classes). if it doesn't, you have to correct the
stuff manually (db and/or migrations classes). Update your classes
ONLY if migration worked. Else, you'll not be able to generate the
classes again (because your schema files and your model classes will
match)

Let me know if you get it.

Cheers,
Guill



On Mar 25, 6:29 am, Tom Haskins-Vaughan <[email protected]>
wrote:
> http://www.symfony-project.org/doctrine/1_2/en/07-Migrations
>
> I don't know if there are any major differences for sf1.4.
>
>
>
> On Wed, Mar 24, 2010 at 4:53 PM, Parijat Kalia <[email protected]> wrote:
> > Migrations? I haven't yet heard of them. Does the book cover it by any
> > chance? Please give me some pointers on where I can learn more about
> > migrations. That would be awesome. Thanks!
>
> > On Wed, Mar 24, 2010 at 11:47 AM, Eno <[email protected]> wrote:
>
> >> On Tue, 23 Mar 2010, Parijat Kalia wrote:
>
> >> > I don't want that to happen. Is symfony trying to tell me that there is
> >> > no
> >> > way around this? That I absolutely must loose all my data so as to be
> >> > able
> >> > to add new data? OMG!
>
> >> That's why migrations in Doctrine rock.
>
> >> --
> >> A
>
> >> --
> >> If you want to report a vulnerability issue on symfony, please send it to
> >> security at symfony-project.com
>
> >> You received this message because you are subscribed to the Google
> >> Groups "symfony users" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >>http://groups.google.com/group/symfony-users?hl=en
>
> >> To unsubscribe from this group, send email to
> >> symfony-users+unsubscribegooglegroups.com or reply to this email with the
> >> words "REMOVE ME" as the subject.
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscribegooglegroups.com or reply to this email with the
> > words "REMOVE ME" as the subject.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to