Executes the command.

def handle(self):
        """
        Executes the command.
        """
        if not self.confirm_to_proceed(
            "<question>Are you sure you want to refresh the database?:</question> "
        ):
            return

        database = self.option("database")

        options = [("--force", True)]

        if self.option("path"):
            options.append(("--path", self.option("path")))

        if database:
            options.append(("--database", database))

        if self.get_definition().has_option("config"):
            options.append(("--config", self.option("config")))

        self.call("migrate:reset", options)

        self.call("migrate", options)

        if self._needs_seeding():
            self._run_seeder(database)