howyi / conv-laravel
MySQL migration query auto generate on Laravel/Lumen
conv-laravel
MySQL migration query auto generate on Laravel/Lumen
Install
- require library (Laravel/Lumen)
composer require "howyi/conv-laravel" --dev
- publish config (only Laravel)
php artisan vendor:publish --provider="Howyi\ConvLaravel\ConvServiceProvider"
- schema initialize (Laravel/Lumen)
php artisan conv:reflect
generate CREATE queries on database/schemas
Usage
- edit CREATE query (in schema directory)
-
php artisan conv:generate
to generate migrations from actual Database - CREATE queries -
php artisan migrate
to migration
feature
Generate MySQL migration queries from actual DB (\PDO) and DDLs (CREATE queries)
motivation
I'm tired of writing migration queries ... π
install
- require library (Laravel/Lumen)
composer require "howyi/conv-laravel" --dev
- publish config (only Laravel)
php artisan vendor:publish --provider="Howyi\ConvLaravel\ConvServiceProvider"
- schema initialize (Laravel/Lumen)
php artisan conv:reflect
generate CREATE queries on database/schemas
usage
- edit CREATE query (in schema directory)
-
php artisan conv:generate
to generate migrations from actual Database - CREATE queries -
php artisan migrate
to migration
example
example repository π
Top comments (1)
Good idea, transforming sql to migration syntax would be the heaven!