src/console/controllers/Migrate.php
public function create($argv) {

        $custom_name = false;

        if ($argv && count($argv)) {

            $custom_name = mb_strtolower($argv[0], 'utf-8');
        }

        DB::begin();
        try {
            $name = 'm' . gmdate('ymd_His');
            if ($custom_name)
                $name = $name . '_' . $custom_name;

            $file = '<?php
// ' . strftime('%F %T') . '

use mii\db\Migration;
use mii\db\DB;

class ' . $name . ' extends Migration {

    public function up() {

    }

    public function down() {
        return false;
    }
    
    public function safe_up() {

    }

    public function safe_down() {
        return false;
    }

}
';
            reset($this->migrations_paths);
            file_put_contents(current($this->migrations_paths) . '/' . $name . '.php', $file);

            DB::commit();

            $this->info('migration :name created', [':name' => $name]);

        } catch (\Exception $e) {
            DB::rollback();
            throw $e;
        }

    }
public function create($argv) {

        $custom_name = false;

        if ($argv && count($argv)) {

            $custom_name = mb_strtolower($argv[0], 'utf-8');
        }

        DB::begin();
        try {
            $name = 'm' . gmdate('ymd_His');
            if ($custom_name)
                $name = $name . '_' . $custom_name;

            $file = '<?php
// ' . strftime('%F %T') . '

use mii\db\Migration;
use mii\db\DB;

class ' . $name . ' extends Migration {

    public function up() {

    }

    public function down() {
        return false;
    }
    
    public function safe_up() {

    }

    public function safe_down() {
        return false;
    }

}
';
            reset($this->migrations_paths);
            file_put_contents(current($this->migrations_paths) . '/' . $name . '.php', $file);

            DB::commit();

            $this->info('migration :name created', [':name' => $name]);

        } catch (\Exception $e) {
            DB::rollback();
            throw $e;
        }

    }
Create new migration file