Hello,

I have a created table as :

"""
Table definition
"""
db.define_table("member",
      SQLField("membership_id", "integer",notnull=True),
      SQLField("first_name", "string", notnull=True,length=100),
      SQLField("middle_name", "string", notnull=True,length=100),
      SQLField("last_name", "string", notnull=Tru
      SQLField("health_problems", "string", default=None),
      ,migrate=False)

so the table is created.

Then i want to add new field into that table so i did the following:

"""
Table definition
"""
db.define_table("member",
      SQLField("membership_id", "integer",notnull=True),
      SQLField("first_name", "string", notnull=True,length=100),
      SQLField("middle_name", "string", notnull=True,length=100),
      SQLField("last_name", "string", notnull=Tru
      SQLField("health_problems", "string", default=None),
      SQLField("photo", "upload"),
      )

1- add the new field
2- remove the migrate statements

then am trying to run my application it cause
"
 OperationalError: (1060, "Duplicate column name
'health_problems__tmp'")
"

How can i fix this? and adding a new field into "member" table.


Thanks In Advance
Neveen

Reply via email to