[sqlalchemy] Re: mysql to sqlalchemy table definition in .py file?

2008-10-10 Thread az

On Friday 10 October 2008 02:06:51 Lukasz Szybalski wrote:
 On Tue, Sep 30, 2008 at 2:35 AM,  [EMAIL PROTECTED] wrote:
  well it's up to you to extend it to mysql... i don't use mysql,
  nor i know much about sql anyway; all specific stuff there is a
  steal/copy/try/error.
 
  http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc
 /metadata/autoload.py?revision=208view=markup give it dburl

 Does this code actually prints the table structure in a sqlalchemy
 way?  or just moves the data from one db to another?
does print. have u tried it?
moving is in the other files.

--~--~-~--~~~---~--~~
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: mysql to sqlalchemy table definition in .py file?

2008-10-10 Thread Lukasz Szybalski

On Fri, Oct 10, 2008 at 1:50 AM,  [EMAIL PROTECTED] wrote:

 On Friday 10 October 2008 02:06:51 Lukasz Szybalski wrote:
 On Tue, Sep 30, 2008 at 2:35 AM,  [EMAIL PROTECTED] wrote:
  well it's up to you to extend it to mysql... i don't use mysql,
  nor i know much about sql anyway; all specific stuff there is a
  steal/copy/try/error.
 
  http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc
 /metadata/autoload.py?revision=208view=markup give it dburl

 Does this code actually prints the table structure in a sqlalchemy
 way?  or just moves the data from one db to another?
 does print. have u tried it?
 moving is in the other files.



 python autoload.py  mysql://user:[EMAIL PROTECTED]/production
Traceback (most recent call last):
  File autoload.py, line 203, in ?
assert 0, 'unsupported engine.dialect:'+str( engine.dialect)
AssertionError: unsupported
engine.dialect:sqlalchemy.databases.mysql.MySQLDialect object at
0xb782a02c


but I found sqlaclhemy-migrate

which did the job.
http://code.google.com/p/sqlalchemy-migrate/wiki/MigrateVersioning



And the code is:

easy_install sqlalchemy-migrate
migrate create_model --url=mysql://user:[EMAIL PROTECTED]/production
--repository=some model.py


I can actually use this to manage the db conversion from now on.
Thanks,
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: mysql to sqlalchemy table definition in .py file?

2008-10-09 Thread Lukasz Szybalski

On Tue, Sep 30, 2008 at 2:35 AM,  [EMAIL PROTECTED] wrote:

 well it's up to you to extend it to mysql... i don't use mysql, nor i
 know much about sql anyway; all specific stuff there is a
 steal/copy/try/error.

 http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc/metadata/autoload.py?revision=208view=markup
 give it dburl


Does this code actually prints the table structure in a sqlalchemy
way?  or just moves the data from one db to another?

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: mysql to sqlalchemy table definition in .py file?

2008-09-30 Thread az

well it's up to you to extend it to mysql... i don't use mysql, nor i 
know much about sql anyway; all specific stuff there is a 
steal/copy/try/error.

http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc/metadata/autoload.py?revision=208view=markup
give it dburl

another thing i just noticed, SA.MetaData(reflect=True) has troubles 
with circular dependencies between tables - at create with 'alter 
table'. No idea how that can be solved.

On Tuesday 30 September 2008 00:22:01 Lukasz Szybalski wrote:
 Hello,
 I've asked this about 6 months ago and I was wondering if there was
 any progress

 I have existing mysql database, and I would like to connect to it
 via sqlalchemy using autoload and generate a python file style
 schema out of it.

 I want to migrate my existing mysql database to a mydb.py file
 which I can then use as my base for further development of the
 database.

 The last time I checked there were program to move from one
 database to another but it didn't support mysql.

 Thanks,
 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
-~--~~~~--~~--~--~---