9994a22f16fe4db18d29eb1e998b678804676ef2,server/website/website/management/commands/resetwebsite.py,Command,reset_website,#Command#,25

Before Change


        name = DATABASES["default"]["NAME"]
        local("mysql -u {} -p{} -N -B -e \"DROP DATABASE IF EXISTS {}\"".format(
            user, passwd, name))
        local("mysql -u {} -p{} -N -B -e \"CREATE DATABASE {}\"".format(
            user, passwd, name))
    
        // Reinitialize the website
        local("python manage.py migrate")

After Change


        db.connections.close_all()
        dbname = DATABASES["default"]["NAME"]
        self.call_db_command("DROP DATABASE IF EXISTS {}".format(dbname))
        self.call_db_command("CREATE DATABASE {}".format(dbname))

        // Reinitialize the website
        call_command("makemigrations", "website")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: cmu-db/ottertune
Commit Name: 9994a22f16fe4db18d29eb1e998b678804676ef2
Time: 2019-11-26
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/management/commands/resetwebsite.py
Class Name: Command
Method Name: reset_website


Project Name: cmu-db/ottertune
Commit Name: 72580f65a0e0c986d45c3afe0c2d61281df75734
Time: 2020-04-03
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/management/commands/stopcelery.py
Class Name: Command
Method Name: handle


Project Name: cmu-db/ottertune
Commit Name: 9994a22f16fe4db18d29eb1e998b678804676ef2
Time: 2019-11-26
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/management/commands/resetwebsite.py
Class Name: Command
Method Name: handle