Open GoogleCodeExporter opened 9 years ago
I got this error too.
Original comment by ljsk...@gmail.com
on 4 Nov 2010 at 4:39
41 line
reflection_schema = db.dialect.get_default_schema_name(conn) =>
reflection_schema = db.dialect.default_schema_name
45 line
tablenames = db.dialect.table_names(conn, reflection_schema) =>
tablenames = db.dialect.get_table_names(conn, reflection_schema)
Original comment by alli...@naver.com
on 12 Nov 2010 at 5:08
The above patch worked for me. Would like to see the fixes in a released
version!
Original comment by bob.ippo...@gmail.com
on 23 Nov 2010 at 5:25
FYI I had the same problem using PostgreSQL, this issue is not at all specific
to a backend, it's just a general compatibility issue with sqlautocode and
sqlalchemy.
Original comment by bob.ippo...@gmail.com
on 23 Nov 2010 at 5:26
Hey, thanks a lot for this code ! It worked like a charm, but i have modified
it a bit so it works
with sqlalchemy 0.6.5, py27 and mysql-python1.2.3 (i didnt try it with other
versions) ...
At main.py, line 42 (aprox) i changed:
if options.schema != None:
reflection_schema=options.schema
else:
try:
#reflection_schema = db.dialect.get_default_schema_name(conn)
reflection_schema = db.dialect.get_schema_names(conn)
except NotImplementedError:
reflection_schema = None
#import ipdb; ipdb.set_trace()
tablenames = db.dialect.get_table_names(conn, reflection_schema)
db.dialect.table_names and db.dialect.get_default_schema_name arent there
anymore,
now they are:
- db.dialect.get_schema_names
- db.dialect.get_table_names.
With this i got the database in python code, AWSOME KAWAII !!! (nice in
japanese x) but ...
at the top from models.py i got generated by sqlautocode, the import line that
says:
from sqlalchemy.databases.mysql import *
should be the next one:
from sqlalchemy.dialects.mysql.base import *
Thanks a lot for your work,
Cheers,
Original comment by edvm%x-i...@gtempaccount.com
on 14 Dec 2010 at 4:35
Added patch to handle the new sqlalchemy 0.6.5 method names (see
http://www.sqlalchemy.org/docs/core/schema.html#sqlalchemy.engine.reflection.Ins
pector.default_schema_name)
Original comment by dav...@j5int.com
on 5 Jan 2011 at 3:10
Attachments:
Original issue reported on code.google.com by
a10n3.s7r1k3r@gmail.com
on 3 Nov 2010 at 10:32