[sqlalchemy] Re: sqlalchemy migration/schema creation
On Thursday 17 April 2008 00:07:28 Lukasz Szybalski wrote: On Wed, Apr 16, 2008 at 1:03 AM, [EMAIL PROTECTED] wrote: a separate feature - no. but it's not much to do it. here my attempt at this. try copyall or copydata+autoload from here: svn co http://dbcook.svn.sourceforge.net/dbcook/trunk/dbcook/misc/metadata/ At which point here is the table created in dst database? metadata = autoloader.metadata() here you get the src metadata about tables?!! yes dst_engine= sqlalchemy.create_engine( dbdst) Here you change the engine?? metadata.bind = dst_engine This will create tables from the first line statement? metadata.create_all() yes, create all stuff autoloaded from src, but into dbdst (using dst_engine). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: sqlalchemy migration/schema creation
On Thursday 17 April 2008 18:27:22 Lukasz Szybalski wrote: On Thu, Apr 17, 2008 at 3:51 AM, [EMAIL PROTECTED] wrote: On Thursday 17 April 2008 00:07:28 Lukasz Szybalski wrote: On Wed, Apr 16, 2008 at 1:03 AM, [EMAIL PROTECTED] wrote: a separate feature - no. but it's not much to do it. here my attempt at this. try copyall or copydata+autoload from here: svn co http://dbcook.svn.sourceforge.net/dbcook/trunk/dbcook/misc/metada ta/ At which point here is the table created in dst database? metadata = autoloader.metadata() here you get the src metadata about tables?!! yes dst_engine= sqlalchemy.create_engine( dbdst) Here you change the engine?? metadata.bind = dst_engine This will create tables from the first line statement? metadata.create_all() yes, create all stuff autoloaded from src, but into dbdst (using dst_engine). Have you ever tried this with mssql to mysql? Any potential problems? never tried mysql. apart of naming.. and some weird type.. what else can go wrong? just try and tell us how it goes... mysql to whatever may need additional stuff in Autoload, e.g. for indexes if u want them too. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: sqlalchemy migration/schema creation
a separate feature - no. but it's not much to do it. here my attempt at this. try copyall or copydata+autoload from here: http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc/metadata/ svn co http://dbcook.svn.sourceforge.net/dbcook/trunk/dbcook/misc/metadata/ it's not dbcook/ dependent except some util.attr module usage: $ python copyall.py srcdburl destdburl we've used this to copy whole from sqlite to postgres to m$sql ciao svilen Hello, Is there maybe a feature in sqlalchemy that would allow me to autoload table from one database, and move it over to another database? 1. I would like to print data structure from autoload table. (then copy and paste it into new file and use it to create new table)(without typing every data structure) 2. And/or autoload via one engine and autoupload via different engine and create_all() 3. Analyze csv files and create sqlalchemy definition like structure. Ideas? Lucas --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: sqlalchemy migration/schema creation
On Wed, Apr 16, 2008 at 1:03 AM, [EMAIL PROTECTED] wrote: a separate feature - no. but it's not much to do it. here my attempt at this. try copyall or copydata+autoload from here: http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc/metadata/ svn co http://dbcook.svn.sourceforge.net/dbcook/trunk/dbcook/misc/metadata/ this works: svn co https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/misc/metadata/ At which point here is the table created in dst database? metadata = autoloader.metadata() here you get the src metadata about tables?!! dst_engine= sqlalchemy.create_engine( dbdst) Here you change the engine?? metadata.bind = dst_engine This will create tables from the first line statement? metadata.create_all() Lucas --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---