1050 OperationalError

16 views
Skip to first unread message

Davey Marsden

unread,
Dec 12, 2020, 12:37:44 PM12/12/20
to web2py-users
I looked in w2p manual, and there is one example of OperationalError - attempting to insert the same person.p.398.

My message is: <class '_mysql_exceptions.OperationalError'> (1050, "Table 'auth_user' already exists")

the code includes a "db.define_table(auth_user

and that's where it seems to be failing.

Any takers?

Davey

villas

unread,
Dec 14, 2020, 8:32:52 AM12/14/20
to web2py-users
It is possible that you do not have a .table file in the databases folder,  but yet the db.auth_user table already does exist in your database. 
The solution to that problem is usually to use fake_migrate to generate a corresponding table file.  This can be found referenced in the book.  Hope that helps.
Reply all
Reply to author
Forward
0 new messages