class Storm(db.Model): tablename='storm' table_args (
db.UniqueConstraint('name','year'),
)
You are actually calling a magic method called tableargs__ but at this point there is not a function called like that, so I think what you want to do is something like this:
class Storm(db.Model): tablename='storm' table_args = ( #new edit
db.UniqueConstraint('name','year'),
)
class Storm(db.Model):
tablename='storm'
table_args (
db.UniqueConstraint('name','year'),
)
You are actually calling a magic method called tableargs__ but at this point there is not a function called like that, so I think what you want to do is something like this:
class Storm(db.Model):
tablename='storm'
table_args = ( #new edit
db.UniqueConstraint('name','year'),
)
Ohh man, am so embarrassed right now. Thanks i got the mistake