aimme/laravel-dynamo
Composer 安装命令:
composer require aimme/laravel-dynamo
包简介
app for creating laravel components
README 文档
README
The package generates migration files for the application using raw mysql file. I use this package to create migration files for the applications after designing and exporting my ERDs to raw mysql from mysql workbench. I have just used this on Laravel 5 and hopefully so far it works.
Installation
Require this package in your composer.json and update composer
"aimme/laravel-dynamo": "1.0.0"
To publish the config settings in Laravel 5 use:
php artisan vendor:publish --provider="Aimme\Dynamo\DynamoServiceProvider"
The generator is bound to the ioC as dynamo
$generator = App::make('dynamo');
Documentation
- configure the paths in
config/dynamo.php. Sample values has already been provided
'migrations' => [ //path to the source erd sql export file 'source' => [ 'raw' => 'mysql.sql', //source export file by default app will look for the file project root folder. 'formatted' => 'formatted_source.txt' //to store the formatted source, by default the file will be created in project root ], //make: this array is loaded to the MakeMigraions as making migrations configs //order: tells the order of making migrations //id_as_auto_increment: true means if id is set in a table it would be set as increments() //or bigIncrements() depending on the field type declared. //timestamps_for_all: adds timestamps()->useCurrent() to all migrations even if its not declared in dump //output_path: to where all the migrations to be created. Changing it from here wouldn't bring any changes while running through artisan. Just use --path option to define path other than app defined path (database/migrations). //clean_folder: removes all the previous file in the path, if any 'make' => [ 'order' => [ // 'users', 'items_features', // 'listings', 'sellers', // 'features', // 'items' ], 'id_as_auto_increment' => true, 'timestamps_for_all' => true, 'include_remaining' => true, 'output_path' => 'database/migrations', 'clean_folder' => true ], ]
after configuring run the artisan command to generate the migration files from the sql file
php artisan generate:migrations
a parameter is available to change the path of the sql file, if not defined it will look into file path defined in the configuration array [migrations] [source] [raw]. For more information see the above configuration file. By default you can put the mysql file named mysql.sql in the root folder, without bringing any changes to the configuration.
example:
php artisan generate:migrations mysqlfile.sql
--path option can be used to define path other than app defined migrations path (database/migrations). The location where the migration files should be created in.
example:
php artisan generate:migrations mysqlfile.sql --path=another/migrations
aimme/laravel-dynamo 适用场景与选型建议
aimme/laravel-dynamo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 39 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 06 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 aimme/laravel-dynamo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aimme/laravel-dynamo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-06-12