leekung/webman-migrations 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

leekung/webman-migrations

最新稳定版本:2.0.0

Composer 安装命令:

composer require leekung/webman-migrations

包简介

Webman plugin eloquent-ORM migrations

README 文档

README

A migration tool for webman, similar to Laravel migration.

composer require leekung/webman-migrations

Similar to the usage of Laravel migration:

# generate a migration file
php webman migrate:create create_users_table
# generate a migration file in a specified directory
php webman migrate:create create_users_table --path=admin
# execute the migration
php webman migrate:run
# execute the migration in a specified directory
php webman migrate:run --path=admin
# rollback the migration
php webman migrate:rollback
# check the migration status
php webman migrate:status
# fresh migration from start
php webman migrate:fresh
# generate a data seeding file
php webman seed:create UserSeeder
# execute data seeding
php webman seed:run

Specify the database connection:

$this->schema()->setConnection(Db::connection('mysql2'))->create('orders', function (Blueprint $table) {
    $table->id();
    $table->timestamps();
});

Create a database

php webman create:database test

Execute the migration on the specified database:

php webman migrate:run --database=test

Seed the data on the specified database:

 php webman seed:run --database=test

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-27