another version, separated autoload from code-generation, which is now the __main__ test.
http://dbcook.svn.sourceforge.net/viewvc/*checkout*/dbcook/trunk/autoload.py now it is possible to do something like: $ python autoload.py postgres://[EMAIL PROTECTED]/db1 | python - sqlite:///db2 copying the structure of input db1 database into the output db2. ciao svilen > this is along the recent threads about metadata consistency between > code and DB, and the DB-migration. Both these require a full > metadata reflection from database. > > Here a version of autocode.py, hacked for couple of hours. > It has more systematic approach, replaces back column types with SA > ones, has sqlite and postgress, and is somewhat simpler but more > dense. Output also looks nicer (nested identation). Not tested for > mssql. > > my idea is to use this metadata-reflection as starting point > towards model-migration technology or framework or whatever. > > one way is to put all metadata-reflection in the dialects > themselves. Maybe there should be reflect_metadata() method, which > will extract all tables/names, indexes, etc. This is what i like, > although it means hacking 10 files instead of one. But it would be > more easier/consistent on the long run. > > Another way is to pull all reflection stuff out of dialects, or at > least separate it somehow. > > anyway. > > http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode#autoload2 >codeorAutoCode3 > > using some metadata howto from: > http://sqlzoo.cn/howto/source/z.dir/tip137084/i12meta.xml > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---