Hey Jonathan, Ah yeah, for sure. I thought of it pretty shortly once I started getting in on things here too. That's what I was saying, though, wrt to the pickle command being potentially just what you're looking for. polpak on #python also suggested exporting it to XML, which actually strikes me as potentially exactly the right idea. The link in question that he threw at me was: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355487
Of course, I keep all my DDL in the database anyways and never actually explicitly specify my Tables in Python. Why keep the DDL in two places, when it's already so hard to manage in one, especially when, to the best of my knowledge, there isn't anything to migrate a table from how it is in the database to how you've specified it in the Python code. Now, if that other project regarding migrating schemas comes to fruition... HTH, -G On Sunday, May 7, 2006, 9:51:49 PM, you wrote: > On May 7, 2006, at 6:28 AM, Gambit wrote: >> Hey All, >> >> Maybe I'm missing something, but isn't this what reflection is all >> about? You >> can easily (well, on most DB's at least) throw a bit of explicit >> SQL at the >> database to get a list of all the tables, from there simply create the >> necessary Table() objects. It might take a while, of course, but >> the whole >> affair might be easily pickle()-able as well. > No, you're dead on. That's exactly what I'm talking about. > I just mean to say that it would be really cool if there were a part > of SQLalchemy that let you connect to the DB , pull out all the table > schemas like that, and then spit it into a .py file that has all of > the table information and some classes as well, so you can then go > in and assign m2m mappers / etc. > It would basically take care of 70% of the work in porting an > existing project to SQLalchemy automagically. > | - - - - - - - - - - - - - - - - - - - - > | RoadSound.com / Indie-Rock.net > | Collaborative Online Management And Syndication Tools > | - - - - - - - - - - - - - - - - - - - - > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlalchemy-users mailing list > Sqlalchemy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users