I would advise the use of sqlalchemy-migrate, it takes some
time to get it up and running and get used to it, but it's well
worth the effort.

http://code.google.com/p/sqlalchemy-migrate/

The nice thing is that it keeps track of the 'revision' of
your database schema.  So you can develop everything against
your test db, and once you put your app in production at
multiple sites or at new sites, you just run the upgrade command,
and your db is ready.

for difficult migrations, you can always use plain sql
commands using engine.execute('alter table ...')

as for the recipe on the elixir website on using sqlalchemy-migrate,
it's not really complete...

regards,

Erik

On Jun 15, 5:11 pm, "Giovanni Marco Dall'Olio" <[email protected]>
wrote:
> Hi,
> this question has been already asked in this list one year ago, but I would
> like to know if it has changed in the mean time.
>
> So, what is the best way to alter a table structure with elixir?
> In particular, I want to add a new table, and some OneToMany and ManyToMany
> relationships to it in the existing tables.
> This could be done manually, but I am not sure on how to do it and keep it
> compatible with elixir and how to make elixir recognize it later.
>
> --
> Giovanni Dall'Olio, phd student
> Department of Biologia Evolutiva at CEXS-UPF (Barcelona, Spain)
>
> My blog on bioinformatics:http://bioinfoblog.it
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to