Issue 66 in contentmirror: DDL script fails

9 views
Skip to first unread message

conten...@googlecode.com

unread,
Jun 29, 2010, 1:23:32 PM6/29/10
to conten...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 66 by guitar...@vt.edu: DDL script fails
http://code.google.com/p/contentmirror/issues/detail?id=66

What steps will reproduce the problem?
1. Install ContentMirror on Plone 3.2.3 (see Issue 65)
2. Try to run "mirror-ddl" script.

What is the expected output? What do you see instead?

I expected it to dump the database schema. It dumped a huge stack trace
instead.

What version of the product are you using? On what operating system?

ContentMirror 0.6.0rc2

Please provide any additional information below.

$ bin/mirror-ddl postgres > dump.sql

/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/types.py:547:
SADeprecationWarning:
The Binary type has been renamed to LargeBinary.
return typeobj()
/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/engine/url.py:99:
SADeprecationWarning:
The SQLAlchemy PostgreSQL dialect has been renamed
from 'postgres' to 'postgresql'. The new URL format is
postgresql[+driver]://<user>:<pass>@<host>/<dbname>
module = __import__('sqlalchemy.dialects.%s' % (dialect, )).dialects
Traceback (most recent call last):
File "bin/mirror-ddl", line 153, in ?
ore.contentmirror.ddl.main()

File "/var/plone/myproject/eggs/ore.contentmirror-0.6.0_rc2-py2.4.egg/ore/contentmirror/ddl.py",
line 59, in main
schema.metadata.create_all(db)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/schema.py",
line 1975, in create_all
bind.create(self, checkfirst=checkfirst, tables=tables)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/engine/strategies.py",
line 217, in create
ddl.SchemaGenerator(self.dialect, self, **kwargs).traverse(entity)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/sql/visitors.py",
line 87, in traverse
return traverse(obj, self.__traverse_options__, self._visitor_dict)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/sql/visitors.py",
line 198, in traverse
return traverse_using(iterate(obj, opts), obj, visitors)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/sql/visitors.py",
line 192, in traverse_using
meth(target)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/engine/ddl.py",
line 42, in visit_metadata
self.traverse_single(table, create_ok=True)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/sql/visitors.py",
line 77, in traverse_single
return meth(obj, **kw)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/engine/ddl.py",
line 56, in visit_table
self.traverse_single(column.default)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/sql/visitors.py",
line 77, in traverse_single
return meth(obj, **kw)

File "/var/plone/myproject/eggs/SQLAlchemy-0.6.1-py2.4.egg/sqlalchemy/engine/ddl.py",
line 73, in visit_sequence
self.connection.execute(schema.CreateSequence(sequence))

File "/var/plone/myproject/eggs/ore.contentmirror-0.6.0_rc2-py2.4.egg/ore/contentmirror/ddl.py",
line 50, in write_statement
ddl = statement + parameters
TypeError: unsupported operand type(s) for +: 'CreateSequence' and 'str'


conten...@googlecode.com

unread,
Jun 29, 2010, 1:27:51 PM6/29/10
to conten...@googlegroups.com

Comment #1 on issue 66 by guitar...@vt.edu: DDL script fails
http://code.google.com/p/contentmirror/issues/detail?id=66

Incidentally, I tried this edit to the write_statement() function at line
50 in ore/contentmirror/ddl.py:

try:


ddl = statement + parameters

except:
buf.write("/* BOMBED! */\n")
ddl = str(statement) + parameters

That made something show up. Now, I'll go see if it works in postgres.

conten...@googlecode.com

unread,
Jul 9, 2010, 1:34:41 AM7/9/10
to conten...@googlegroups.com
Updates:
Status: Accepted
Owner: kapilt
Labels: -Priority-Medium Priority-High

Comment #2 on issue 66 by kapilt: DDL script fails
http://code.google.com/p/contentmirror/issues/detail?id=66

it sounds like sqlalchemy changed its api for this between 0.5 and 0.6.

http://www.sqlalchemy.org/trac/wiki/FAQ#HowcanIgettheCREATETABLEDROPTABLEoutputasastring

conten...@googlecode.com

unread,
Jul 28, 2010, 8:45:23 AM7/28/10
to conten...@googlegroups.com
Updates:
Status: Fixed
Labels: Milestone-Release0.6

Comment #3 on issue 66 by kapilt: DDL script fails
http://code.google.com/p/contentmirror/issues/detail?id=66

0.6.0-rc3 was released with an explicit version pin to sqlalchemy 0.5.8 in
setup.py, which resolves this issue.

Reply all
Reply to author
Forward
0 new messages