{"repo":"kitloong/laravel-migrations-generator","free":true,"listed":false,"github":"https://github.com/kitloong/laravel-migrations-generator","clone":"git clone https://github.com/kitloong/laravel-migrations-generator.git","description":"Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.","language":"PHP","stars":2865,"topics":["laravel","existing-database","lumen","database-migrations","migrations"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Migrations Generator Generate Laravel Migrations from an existing database, including indexes and foreign keys! Documentation Checkout the documentation for more details. Supported Database Laravel Migrations Generator supports all five Laravel first-party support databases: - [x] MariaDB - [x] MySQL - [x] PostgreSQL - [x] SQL Server - [x] SQLite Install The recommended way to install this is through composer: Laravel Setup Laravel will automatically register service provider for you. Lumen Setup Expand Auto-discovery is not available in Lumen, you need some modification on bootstrap/app.php . Enable Facade Uncomment the following line. Register Provider Add following line into the Register Service Providers section. Usage To generate migrations from a database, you need to have your database setup in Laravel's config ( config/database.php ). To create migrations for all the tables, run: You can specify the tables you wish to generate using: You can also ignore tables with: Laravel Migrations Generator will first generate all the tables, columns and indexes, and afterward setup all the foreign key constraints. So make sure you include all the tables listed in the foreign keys so that they are present when the foreign keys are created. You can also specify the connection name if you are not using your default connection with: Squash Migrations By default, Generator will generate multiple migration files for each table. You can squash all migrations into a single file w","default_branch":null,"files":null,"tree":[],"storefront":"/r/kitloong","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kitloong/laravel-migrations-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}