kosa3/migration-stub-extention 问题修复 & 功能扩展

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

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

kosa3/migration-stub-extention

Composer 安装命令:

composer require kosa3/migration-stub-extention

包简介

README 文档

README

Software License

Install

Require this package with composer using the following command:

composer require --dev kosa3/migration-stub-extention:dev-master

After updating composer, add the migration directory to the resources stubs blank.stub create.stub update.stub

You can customize the stub file freely.

public function up()
{
    Schema::create('DummyTable', function (Blueprint $table) {
        $table->bigIncrements('id');
        $table->timestamp('created_at')->nullable();
        $table->string('create_type', 32)->nullable()->default(null);
        $table->integer('create_id')->nullable()->default(null);
        $table->timestamp('updated_at')->nullable();
        $table->string('update_type', 32)->nullable()->default(null);
        $table->integer('update_id')->nullable()->default(null);
    });
}

After edited, make migration file by artisan command.

php artisan make:migration CreateUser --create users
class CreateUser extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamp('created_at')->nullable();
            $table->string('create_type', 32)->nullable()->default(null);
            $table->integer('create_id')->nullable()->default(null);
            $table->timestamp('updated_at')->nullable();
            $table->string('update_type', 32)->nullable()->default(null);
            $table->integer('update_id')->nullable()->default(null);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}

License

The package is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固