@@ -0,0 +1,775 @@
+from django.core.management.base import BaseCommand%0Afrom django_extensions.management.commands import reset_db%0Afrom subprocess import call%0A%0A%0Aclass Command(BaseCommand):%0A    help = %22%22%22Recreates a database using the current local migration files.%0A              It runs loadstatic at the end.%22%22%22%0A%0A    def handle(self, *args, **options):%0A%0A        print('RESETTING DATABASE%5Cn')%0A        reset_db.Command().handle(router='default')%0A%0A        print('MAKING MIGRATION FILES%5Cn')%0A        call(args=%5B'./manage.py', 'makemigrations'%5D)%0A%0A        print('LOADING MIGRATION FILES%5Cn')%0A        call(args=%5B'./manage.py', 'migrate'%5D)%0A%0A        print('LOADING STATIC:%5Cn')%0A        call(args=%5B'./manage.py', 'loadstatic'%5D)%0A%0A        self.stdout.write(self.style.SUCCESS(%22Database reset successfully.%22))%0A

add command to reset database when switching branches (#1730)