Hi, this code works with web2py 1.83.2 and mysql

but,with web2py in trunk and mysql it doesn't works

cfedb.define_table('med_dnpmst_4',
        Field('DireccionUTR', 'integer' , length = 6 ),
        Field('Indice', 'id' ),
        Field('ValorActual', 'double' ),
        Field('Resolucion', 'integer' , length = 4 ),
        Field('ClaveMaxyMinIngenieril', 'integer' , length = 1 ),
        Field('BandaMuerta', 'double' ),
        Field('Tipo', 'integer' , length = 1 ),
        Field('ClaveMediciones', 'integer' , length = 6 ),
        primarykey=['DireccionUTR','Indice'],
        migrate = False)

This is the traceback

Traceback (most recent call last):
  File "/home/drayco/web2py/gluon/restricted.py", line 188, in
restricted
    exec ccode in environment
  File "/home/drayco/web2py/applications/iscada/models/cfedb.py", line
16, in <module>
    migrate = False)
  File "/home/drayco/web2py/gluon/dal.py", line 3429, in define_table
    sequence_name=sequence_name))
  File "/home/drayco/web2py/gluon/dal.py", line 3713, in __init__
    "primarykey must be a list of fields from table '%s " % tablename
SyntaxError: primarykey must be a list of fields from table
'med_dnpmst_4

Can I need to change something?

Reply via email to