alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

specifying define_table(primarykey=...) results in SQL error when creating DB #73

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From r.brian....@gmail.com on March 29, 2010 17:01:34

  1. db.define_table('foo', Field('foo_id', 'integer'), primarykey=["foo_id"])
  2. go to database administration
  3. observe ticket generated by error

expected output: list of databases and database tables observed output: error ticket with traceback ending with: OperationalError: unrecognized token: "` PRIMARY KEY (foo_id)) ;"

1.76.5 on MacOSX 10.6.2 using built-in python2.6.

Apparently fixed by removing the backquote after \n in gluon/sql.py:2303 and gluon/dal.py:2505.

Original issue: http://code.google.com/p/web2py/issues/detail?id=74

alfonsodg commented 10 years ago

From massimod...@gmail.com on April 05, 2010 10:21:10

Thanks. fixed. please check it.

Status: Fixed