Skip to main content

execute_migrate

Function execute_migrate 

Source
pub fn execute_migrate(args: &MigrateArgs) -> Result<(), CliError>
Expand description

执行 migrate 命令

  • --rollback:执行所有待迁移(对齐 php think migrate
  • --rollback:回滚最后一批迁移(对齐 php think migrate:rollback

§模式

  • 离线模式(默认,未提供 --url):仅解析迁移目录并打印待执行内容
  • 在线模式(提供 --url):连接数据库执行真实迁移