https://github.com/alicfeng/laravel-migrate
基于 Laravel 官方针对 Migrate 层面构建增强化扩展组件
https://github.com/alicfeng/laravel-migrate
extend laravel migrate mysql
Last synced: 10 months ago
JSON representation
基于 Laravel 官方针对 Migrate 层面构建增强化扩展组件
- Host: GitHub
- URL: https://github.com/alicfeng/laravel-migrate
- Owner: alicfeng
- Created: 2020-02-24T16:14:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-06T11:59:41.000Z (almost 6 years ago)
- Last Synced: 2025-04-30T09:16:54.781Z (about 1 year ago)
- Topics: extend, laravel, migrate, mysql
- Language: PHP
- Homepage: https://note.samego.com
- Size: 6.84 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LaravelMigrate
LaravelMigrate Extend Plugin
#### 扩展与使用
###### `Schema` 支持对表名注释 与 支持对表自增字段设定梯度
```php
use Illuminate\Database\Schema\Blueprint;
use AlicFeng\Migrate\Schema\Schema;
Schema::create('users', function (Blueprint $table) {
// 注明表注释
$table->comment = '用户基准表';
// 设定自增字段梯度
$table->auto_increment = 2;
});
```
#### 安装
在项目`composer.json`添加依赖,如下:
```
"require": {
"alicfeng/laravel-migrate": "~1.0.0"
}
```
或者直接通过`CLI`安装,如下:
```shell
composer require "alicfeng/laravel-migrate" -vvv
```
#### 配置
将应用配置中原有 `Schame` 别名引用改成此组件即可
```php
[
'aliases'=>[
//'Schema' => Illuminate\Support\Facades\Schema::class,
'Schema' => AlicFeng\Migrate\Schema\Schema::class,
]
];
```
#### 版本更新
###### 1.0.0
- 支持对表名注释 与 支持对表自增字段设定梯度