Did you change the database password, or something else in the URI string? If so, and if you did not change anything else, set a fake_migration=True to rebuild the *.table for the new URI.
On Saturday, 7 April 2012 02:33:32 UTC-5, Ronghui Yu wrote: > > Hi, All, > > I was running my app locally with sqlite on local, but after deployment, I > switched to MySQL and Apache with WSGI. The first time it runs well, but > after Apache restarted, it reports error below: > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. > 12. > 13. > 14. > 15. > 16. > 17. > 18. > 19. > 20. > 21. > 22. > 23. > > Traceback (most recent call last): > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/restricted.py", line 205, > in restricted > > exec ccode in environment > > File "/home/stoneyrh/webapps/xlang/web2py/applications/xlang/models/db.py" > <https://www.xwsvc.net/admin/default/edit/xlang/models/db.py>, line 48, in > <module> > > auth.define_tables() > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/tools.py", line 1309, in > define_tables > > format='%(first_name)s %(last_name)s (%(id)s)')) > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/dal.py", line 6320, in > define_table > > polymodel=polymodel) > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/dal.py", line 719, in > create_table > > self.create_sequence_and_triggers(query,table) > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/dal.py", line 1381, in > create_sequence_and_triggers > > self.execute(query) > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/dal.py", line 1392, in > execute > > return self.log_execute(*a, **b) > > File "/home/stoneyrh/webapps/xlang/web2py/gluon/dal.py", line 1386, in > log_execute > > ret = self.cursor.execute(*a, **b) > > File > "/home/stoneyrh/webapps/xlang/web2py/gluon/contrib/pymysql/cursors.py", line > 108, in execute > > self.errorhandler(self, exc, value) > > File > "/home/stoneyrh/webapps/xlang/web2py/gluon/contrib/pymysql/connections.py", > line 184, in defaulterrorhandler > > raise errorclass, errorvalue > > InternalError: (1050, u"Table 'auth_user' already exists") > > > As far as I remember that DAL could detect table existence, but it does > not. Am I doing something wrong? > > -- > =========================== > Regards > Ronghui Yu >