0

After migrating my database a few times, I began to see this error appear on my local server. If I clear the database and re-create it, there is no error, so I don't think there is anything wrong with the way my models are written.

I get the following error:

  File "/home/hagandh/Documents/GitHub/pair-site/pair-site/db_repository/versions/006_migration.py",       line 9, in <module>
    Column('id', INTEGER(display_width=11), primary_key=True, nullable=False),
TypeError: object() takes no parameters

From this model:

class Application(db.Model):
    id = db.Column(db.Integer, primary_key = True)

I don't understand what the error is telling me. I assume it is something with the way I am defining an integer, however I have never had this problem before. What should I do to fix this error?

davidism
  • 121,510
  • 29
  • 395
  • 339
David Hagan
  • 1,156
  • 12
  • 23

1 Answers1

1

The INTEGER type doesn't take any arguments. Remove the display_width=11 argument from that line in the migration script.

davidism
  • 121,510
  • 29
  • 395
  • 339