{"action":"created","issue":{"url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog/issues/61","repository_url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog","labels_url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog/issues/61/comments","events_url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog/issues/61/events","html_url":"https://github.com/djangoStudyTeam/DjangoBlog/issues/61","id":171313924,"number":61,"title":"迁移脚本问题","user":{"login":"magiclyx","id":1913753,"avatar_url":"https://avatars.githubusercontent.com/u/1913753?v=3","gravatar_id":"","url":"https://api.github.com/users/magiclyx","html_url":"https://github.com/magiclyx","followers_url":"https://api.github.com/users/magiclyx/followers","following_url":"https://api.github.com/users/magiclyx/following{/other_user}","gists_url":"https://api.github.com/users/magiclyx/gists{/gist_id}","starred_url":"https://api.github.com/users/magiclyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magiclyx/subscriptions","organizations_url":"https://api.github.com/users/magiclyx/orgs","repos_url":"https://api.github.com/users/magiclyx/repos","events_url":"https://api.github.com/users/magiclyx/events{/privacy}","received_events_url":"https://api.github.com/users/magiclyx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-16T03:09:48Z","updated_at":"2016-08-16T15:09:47Z","closed_at":null,"body":"我运行脚本，执行会出错，脚本内容如下：\r\n> find ./ -name 'migrations' | xargs rm -r -f\r\n>find ./ -name '__pycache__' | xargs rm -r -f\r\n>find ./ -name '*.pyc' | xargs rm -f\r\n>rm -f db.sqlite3\r\n>python3 manage.py makemigrations \r\n>python3 manage.py migrate \r\n>python3 manage.py createsuperuser\r\n\r\n\r\n\r\n如果直接运行数据库迁移和创建admin账户，是没有问题的。\r\n> python3 manage.py makemigrations \r\n> python3 manage.py migrate \r\n> python3 manage.py createsuperuser \r\n\r\n\r\n\r\n是不是手动改了迁移脚本？\r\n我觉得在开发阶段，没有数据的时候，没有必要依赖迁移脚本。\r\n应该保证使用迁移命令，随时可以配置环境，所有migrations文件都不会被提交\r\n"},"comment":{"url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog/issues/comments/240132411","html_url":"https://github.com/djangoStudyTeam/DjangoBlog/issues/61#issuecomment-240132411","issue_url":"https://api.github.com/repos/djangoStudyTeam/DjangoBlog/issues/61","id":240132411,"user":{"login":"magiclyx","id":1913753,"avatar_url":"https://avatars.githubusercontent.com/u/1913753?v=3","gravatar_id":"","url":"https://api.github.com/users/magiclyx","html_url":"https://github.com/magiclyx","followers_url":"https://api.github.com/users/magiclyx/followers","following_url":"https://api.github.com/users/magiclyx/following{/other_user}","gists_url":"https://api.github.com/users/magiclyx/gists{/gist_id}","starred_url":"https://api.github.com/users/magiclyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magiclyx/subscriptions","organizations_url":"https://api.github.com/users/magiclyx/orgs","repos_url":"https://api.github.com/users/magiclyx/repos","events_url":"https://api.github.com/users/magiclyx/events{/privacy}","received_events_url":"https://api.github.com/users/magiclyx/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T15:09:47Z","updated_at":"2016-08-16T15:09:47Z","body":"错误信息是\r\n> django.db.utils.OperationalError: no such table: accounts_bloguser\r\n\r\n就是settings中定义的\r\n> AUTH_USER_MODEL = 'accounts.BlogUser'\r\n\r\n应该是更改目录导致的。"}}
{"actor":{"display_login":"magiclyx"}}