On 22 Mai, 10:57, JJ <[EMAIL PROTECTED]> wrote:
> Thanks for the help.I got the concept.I wish to throw an another query.
>
> Suppose I am developing a application and in the middle of development I
> want to add new field(s) in a table(s).Its need to require recreation of
> model classes.But what about the database.How I can manage it.If i will do
> again propel-insert-sql then( If i am right then )it will remove old
> DB.Which steps I should follow to update existing Database using syfony.(Or
> Its require to add manually new fields).
>
> ----JJ
>
> On 5/21/07, OphyTe <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi JJ,
>
> > you can do "$ symfony propel-build-model" if you want have access to
> > the power of ORM with Symfony and after that, you follow the
> > indications of purcaholic (build-sql and then insert-sql)
> > Everything is detailed here
> >http://www.symfony-project.com/book/trunk/08-Inside-the-Model-Layer
>
> --
> Janak Jadeja
> ASPLhttp://www.aspl.in

Yes, afaik the database tables will be generated again, if you update
the schema, rebuild sql and insert the sql statements.

But there exists a migration snipped based on Ruby on Rails, wich
helps changing databasestructure  during development without lost of
existing data. Not everything is automated, but it generates a new sql
schema, makes an backup of the existing one and provides a simple
class to migrate changes on database. Your job is only to put the
differrence between both schemas into an new Migration class and to
call the migration using cli, thats all...

http://trac.symfony-project.com/trac/wiki/Migrations

I've used it for a project, and can really recommend this, because it
provides also the downwards migration.


purcaholic


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to