On Jul 28, 2010, at 9:09 AM, Emanuele Gesuato wrote:

> Hi there,
> 
> I'm using sqlalchemy 0.5 with python 2.5 for a desktop application. I
> know that if the database is empty sqlalchemy can create automatically
> all the tables needed. But what if i have to add some new tables or
> columns or delete columns ?
> I would like to update the schema in the startup of the application;
> is there a way
> that sqlalchemy can handle this issue ?

only if you executed the requisite ALTER TABLE instructions yourself.   

> 
> I know there is sqlalchemy-migrate but i've some problems on
> integrating it into an exe (http://url-zip.com/ao7)

that seems like a very minor issue in migrate - they are using some setuptools 
function internally...a little strange that they need to do that, and there is 
probably some way to work around it.   too bad they didn't respond to you.


> and i'm searching
> some alternatives using only sqlalchemy (or other libraries, hints ?).

I have a migrations tool under construction 
(http://bitbucket.org/zzzeek/alembic) but its not complete and I won't have 
time for a few months to start getting it online.   It also will not be 
supporting SQLite since SQLite has no reasonable ALTER construct.


> 
> Are there any way on doing that ?
> I have to support sqlite and postgresql so it would be great to
> maintain the dbs using the sqlalchemy dialect avoiding sql statement;
> but in the last chance i can use sql directly if there is no other
> way.
> 
> Do i have to write from scratch a migration tool inside my
> application ? Or is there some approach that i can take as example ?

I really think your best bet is to fix Migrate and propose a patch for them.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to