qizhiyi / sqlalchemy-migrate

Automatically exported from code.google.com/p/sqlalchemy-migrate
MIT License
0 stars 0 forks source link

Straight-forward syntax error in genmodel.py #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Printing a genmodel with diffs that require additional table columns
2.  Error occurs
3.

What is the expected output? What do you see instead?
Updates work vs.  the following error :

    print " New Model (in Python): \n\n", newmodel.toUpgradeDowngradePython()[0], "\n"   # Show the Declarations 
  File "/home/lean/python-local/lib/python2.6/site-packages/sqlalchemy_migrate-0.6-py2.6.egg/migrate/versioning/genmodel.py", line 165, in toUpgradeDowngradePython
    modelTable, modelCol.name, databaseCol.name)
TypeError: append() takes exactly one argument (4 given)

What version of the product are you using? On what operating system?
sqlalchemy_migrate-0.6-py2.6.egg
Linux 2.6.18-194.8.1.el5.028stab070.5 #1 SMP 
Python 2.6.2

Please provide any additional information below.
Fix is to change lines 165-168 in migrate/versioning/genmodel.py, so that the 
parameters embedded within the string are '% ()' properly.

Original issue reported on code.google.com by martin.a...@gmail.com on 19 Dec 2010 at 7:16

GoogleCodeExporter commented 8 years ago
Fixed in r860edca83608, waiting for tests.

Original comment by iElect...@gmail.com on 5 Feb 2011 at 1:25

GoogleCodeExporter commented 8 years ago

Original comment by jan.ditt...@gmail.com on 14 Feb 2011 at 6:33