福州仓前网站建设,国内做网站比较好的公司有哪些,做it行业招标网站有哪些,北京做网络优化的公司我正在用MySQL数据库构建一个django应用程序。当我第一次运行“python manage.py migrate”时#xff0c;一些表创建得很好#xff0c;然后出现一些错误。出现的错误是#xff1a;django.db.utils.IntegrityError: (1215, Cannot add foreign keyconstraint)当我运行这个MyS…我正在用MySQL数据库构建一个django应用程序。当我第一次运行“python manage.py migrate”时一些表创建得很好然后出现一些错误。出现的错误是django.db.utils.IntegrityError: (1215, Cannot add foreign keyconstraint)当我运行这个MySQL命令时-SHOW ENGINE INNODB STATUS\G,我明白了gtgt2015-02-17 14:33:17 7f10891cf700 Error in foreign key constraint of table movie_store/#sql-4f1_66:FOREIGN KEY (group_id) REFERENCES auth_group (id):Cannot resolve table name close to:(id)完整的回溯是Creating tables...Creating table usersCreating table merchantCreating table celery_taskmetaCreating table celery_tasksetmetaCreating table djcelery_intervalscheduleCreating table djcelery_crontabscheduleCreating table djcelery_periodictasksCreating table djcelery_periodictaskCreating table djcelery_workerstateCreating table djcelery_taskstateCreating table post_office_emailCreating table post_office_logCreating table post_office_emailtemplateCreating table post_office_attachmentRunning deferred SQL...Traceback (most recent call last):File manage.py, line 10, in execute_from_command_line(sys.argv)File /usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py, line 338, in execute_from_command_lineutility.execute()File /usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py, line 330, in executeself.fetch_command(subcommand).run_from_argv(self.argv)File /usr/local/lib/python2.7/dist-packages/django/core/management/base.py, line 390, in run_from_argvself.execute(*args, **cmd_options)File /usr/local/lib/python2.7/dist-packages/django/core/management/base.py, line 441, in executeoutput self.handle(*args, **options)File /usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py, line 173, in handlecreated_models self.sync_apps(connection, executor.loader.unmigrated_apps)File /usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py, line 309, in sync_appscursor.execute(statement)File /usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py, line 80, in executereturn super(CursorDebugWrapper, self).execute(sql, params)File /usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py, line 65, in executereturn self.cursor.execute(sql, params)File /usr/local/lib/python2.7/dist-packages/django/db/utils.py, line 95, in __exit__six.reraise(dj_exc_type, dj_exc_value, traceback)File /usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py, line 63, in executereturn self.cursor.execute(sql)File /usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py, line 124, in executereturn self.cursor.execute(query, args)File /usr/lib/python2.7/dist-packages/MySQLdb/cursors.py, line 174, in executeself.errorhandler(self, exc, value)File /usr/lib/python2.7/dist-packages/MySQLdb/connections.py, line 36, in defaulterrorhandlerraise errorclass, errorvaluedjango.db.utils.IntegrityError: (1215, Cannot add foreign key constraint)