{"action":"created","issue":{"url":"https://api.github.com/repos/django-nose/django-nose/issues/221","labels_url":"https://api.github.com/repos/django-nose/django-nose/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/django-nose/django-nose/issues/221/comments","events_url":"https://api.github.com/repos/django-nose/django-nose/issues/221/events","html_url":"https://github.com/django-nose/django-nose/pull/221","id":94439730,"number":221,"title":"REUSE_DB=2 ./manage.py test","user":{"login":"harukaeru","id":5797788,"avatar_url":"https://avatars.githubusercontent.com/u/5797788?v=3","gravatar_id":"","url":"https://api.github.com/users/harukaeru","html_url":"https://github.com/harukaeru","followers_url":"https://api.github.com/users/harukaeru/followers","following_url":"https://api.github.com/users/harukaeru/following{/other_user}","gists_url":"https://api.github.com/users/harukaeru/gists{/gist_id}","starred_url":"https://api.github.com/users/harukaeru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harukaeru/subscriptions","organizations_url":"https://api.github.com/users/harukaeru/orgs","repos_url":"https://api.github.com/users/harukaeru/repos","events_url":"https://api.github.com/users/harukaeru/events{/privacy}","received_events_url":"https://api.github.com/users/harukaeru/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/django-nose/django-nose/labels/feature","name":"feature","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/django-nose/django-nose/milestones/7","html_url":"https://github.com/django-nose/django-nose/milestones/Fix%20REUSE_DB=1","labels_url":"https://api.github.com/repos/django-nose/django-nose/milestones/7/labels","id":1191856,"number":7,"title":"Fix REUSE_DB=1","description":"REUSE_DB has many problems.  It requires careful override of default Django test behavior, and the logic hasn't kept up-to-date with the Django test code.  It will probably require a re-write of the code, and maybe should be extracted to it's own project.  For now, document the bugs.","creator":{"login":"jwhitlock","id":286017,"avatar_url":"https://avatars.githubusercontent.com/u/286017?v=3","gravatar_id":"","url":"https://api.github.com/users/jwhitlock","html_url":"https://github.com/jwhitlock","followers_url":"https://api.github.com/users/jwhitlock/followers","following_url":"https://api.github.com/users/jwhitlock/following{/other_user}","gists_url":"https://api.github.com/users/jwhitlock/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhitlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhitlock/subscriptions","organizations_url":"https://api.github.com/users/jwhitlock/orgs","repos_url":"https://api.github.com/users/jwhitlock/repos","events_url":"https://api.github.com/users/jwhitlock/events{/privacy}","received_events_url":"https://api.github.com/users/jwhitlock/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2015-07-03T03:26:22Z","updated_at":"2015-07-13T15:38:29Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-07-11T05:33:47Z","updated_at":"2015-07-13T15:39:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/django-nose/django-nose/pulls/221","html_url":"https://github.com/django-nose/django-nose/pull/221","diff_url":"https://github.com/django-nose/django-nose/pull/221.diff","patch_url":"https://github.com/django-nose/django-nose/pull/221.patch"},"body":"I usually use \r\n`\r\n$ export REUSE_DB=1\r\n`\r\n`\r\n$ ./manage.py test\r\n`\r\nIt always work. Thank you so much for your job!\r\n\r\nHowever, whenever I change the model file, I should do 'migrate', and then REUSE_DB=0.\r\ne.g.\r\n`\r\n$ export REUSE_DB=0  # destroy old database\r\n`\r\n`\r\n$ ./manage.py test  # long time...\r\n`\r\n`\r\n$ export REUSE_DB=1  # save new database\r\n`\r\n`\r\n$ ./manage.py test  # long time...\r\n`\r\n\r\nSo I add the this statement \"os.getenv('REUSE_DB', 'false') != '2':\"\r\n`\r\n$ REUSE_DB=2 ./manage.py test  # destroy old database and save new database\r\n`\r\n\r\nIf you don't mind, please merge this changes :)"},"comment":{"url":"https://api.github.com/repos/django-nose/django-nose/issues/comments/120971647","html_url":"https://github.com/django-nose/django-nose/pull/221#issuecomment-120971647","issue_url":"https://api.github.com/repos/django-nose/django-nose/issues/221","id":120971647,"user":{"login":"jwhitlock","id":286017,"avatar_url":"https://avatars.githubusercontent.com/u/286017?v=3","gravatar_id":"","url":"https://api.github.com/users/jwhitlock","html_url":"https://github.com/jwhitlock","followers_url":"https://api.github.com/users/jwhitlock/followers","following_url":"https://api.github.com/users/jwhitlock/following{/other_user}","gists_url":"https://api.github.com/users/jwhitlock/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhitlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhitlock/subscriptions","organizations_url":"https://api.github.com/users/jwhitlock/orgs","repos_url":"https://api.github.com/users/jwhitlock/repos","events_url":"https://api.github.com/users/jwhitlock/events{/privacy}","received_events_url":"https://api.github.com/users/jwhitlock/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T15:39:02Z","updated_at":"2015-07-13T15:39:02Z","body":"This is an interesting solution.  There is a lot of broken magic with REUSE_DB=1 right now, so I am reluctant to add any more features until the bugs are fixed."}}