jlorente/laravel-data-migrations
Composer 安装命令:
composer require jlorente/laravel-data-migrations
包简介
An extension to allow you to separate data migrations from structure migrations
README 文档
README
This extension allows you to separate data migrations from structure migrations.
Installation
The preferred way to install this extension is through composer.
With Composer installed, you can then install the extension using the following commands:
NOTE: Until laravel 7.x use version 1.x. From laravel 8.0 and later use 2.x
$ php composer.phar require jlorente/laravel-data-migrations
or add
... "require": { "jlorente/laravel-data-migrations": "*" }
to the require section of your composer.json file.
Configuration
- Register the ServiceProvider in your config/app.php service provider list. This step can be skipped in Laravel 5.5+
config/app.php
return [ //other stuff 'providers' => [ //other stuff \Jlorente\DataMigrations\DataMigrationsServiceProvider::class, ]; ];
- Publish the new assets.
php artisan vendor:publish --tag=data-migrations
This will create the default migrations directory and the config/data-migrations.php file.
Usage
By default, the table used to store the data migrations is "migrations_data" table. You can change the table on the config/data-migrations.php file.
The data migrations will be stored in the migrations_data folder of the database path if no path is specified in the command execution.
The available commands of the package are:
Create migration command
php artisan make:data-migration [name] [--path=]
The firts time you use it the data migrations table will be created.
Run migration command
php artisan migrate-data [--path=]
Rollback migration command
php artisan migrate-data:rollback [--path=]
The behavior of the migrations is the same as the regular migrations.
License
Copyright © 2018 José Lorente Martín jose.lorente.martin@gmail.com.
Licensed under the MIT license. See LICENSE.txt for details.
jlorente/laravel-data-migrations 适用场景与选型建议
jlorente/laravel-data-migrations 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 200.94k 次下载、GitHub Stars 达 34, 最近一次更新时间为 2018 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jlorente/laravel-data-migrations 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jlorente/laravel-data-migrations 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 200.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 34
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-13