(I hope this formats correctly.  It seems, sometimes when I copy paste
from my text editor, the email gets strung together in one line.)

I have a migration problem that may be an issue in SA, SA-Migrations or
MySQLdb.

OK, I am narrowing the migration problem down and it looks like an issue
with mysqldb and/or mysql.  In particular someone does not like
STR_TO_DATE().  I can run the SELECT statement with no problem from
mySQL Query Browser, and it gives me a valid datetime type.

I created a super stripped down version of the code.  Basically I am
just adding a stored procedure to the database... I've done it in
previous migrations, but this one fails.

MySQLdb version: 1.2.2  (There might be 1.2.3 available... I'll look
into it.)

mySQL version: "5.0.67-community-nt"

1. Upgrade script:
-- Example of "not enough arguements for format string" problem.
CREATE PROCEDURE my_issue()
BEGIN
  select STR_TO_DATE('01/20/2008 19:44:02', '%c/%d/%Y %T');
END;
;


2. Downgrade script:

DROP PROCEDURE my_issue;


3. Traceback
C:\svn\ECWeb\ec>managelocal.py upgrade
13 -> 14...
Traceback (most recent call last):
  File "C:\svn\ECWeb\ec\manageLocal.py", line 4, in <module>
   
main(url='mysql://rodney:thep...@localhost:3306/ECWebTest',repository='migrati
on')
  File
"c:\python25\lib\site-packages\sqlalchemy_migrate-0.5.2-py2.5.egg\migrate
\versioning\shell.py", line 140, in main
    ret = command(**kwargs)
  File
"c:\python25\lib\site-packages\sqlalchemy_migrate-0.5.2-py2.5.egg\migrate
\versioning\api.py", line 229, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File
"c:\python25\lib\site-packages\sqlalchemy_migrate-0.5.2-py2.5.egg\migrate
\versioning\api.py", line 269, in _migrate
    schema.runchange(ver, change, changeset.step)
  File
"c:\python25\lib\site-packages\sqlalchemy_migrate-0.5.2-py2.5.egg\migrate
\versioning\schema.py", line 183, in runchange
    change.run(self.engine, step)
  File
"c:\python25\lib\site-packages\sqlalchemy_migrate-0.5.2-py2.5.egg\migrate
\versioning\script\sql.py", line 20, in run
    conn.execute(text)
  File
"c:\python25\lib\site-packages\sqlalchemy-0.5.3-py2.5.egg\sqlalchemy\engi
ne\base.py", line 824, in execute
    return Connection.executors[c](self, object, multiparams, params)
  File
"c:\python25\lib\site-packages\sqlalchemy-0.5.3-py2.5.egg\sqlalchemy\engi
ne\base.py", line 888, in _execute_text
    return self.__execute_context(context)
  File
"c:\python25\lib\site-packages\sqlalchemy-0.5.3-py2.5.egg\sqlalchemy\engi
ne\base.py", line 896, in __execute_context
    self._cursor_execute(context.cursor, context.statement,
context.parameters[0
], context=context)
  File
"c:\python25\lib\site-packages\sqlalchemy-0.5.3-py2.5.egg\sqlalchemy\engi
ne\base.py", line 948, in _cursor_execute
    self.dialect.do_execute(cursor, statement, parameters, context=context)
  File
"c:\python25\lib\site-packages\sqlalchemy-0.5.3-py2.5.egg\sqlalchemy\engi
ne\default.py", line 122, in do_execute
    cursor.execute(statement, parameters)
  File
"C:\Python25\lib\site-packages\mysql_python-1.2.2-py2.5-win32.egg\MySQLdb
\cursors.py", line 151, in execute
TypeError: not enough arguments for format string

C:\svn\ECWeb\ec>

Thanks for any help.
-Rodney


--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to