def METHOD_NAME(connection):
    # procedure to create from scratch a sqlite database when using Django ORM
    from django.db.migrations.recorder import MigrationRecorder
    connection.close()
    common_clean(connection.alias, connection.get_connection_params()["database"])
    if connection.alias == NOTIFICATIONS:
        logger.error("Regenerating {}".format(connection.alias))
        # delete the db migrations and run them again
        connection_migrations = MigrationRecorder(connection).Migration
        connection_migrations.objects.filter(app="notifications").delete()
        call_command(
            "migrate",
            interactive=False,
            verbosity=False,
            app_label="notifications",
            database=NOTIFICATIONS,
        )
        call_command("migrate", interactive=False, verbosity=False)