[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8529":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},8529,"migrations-generator","Xethron\u002Fmigrations-generator","Xethron","Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.","",null,"PHP",3324,494,110,66,0,60.08,"MIT License",false,"master",true,[23,24,25],"existing-database","laravel-migration","php","2026-06-12 04:00:40","# Laravel Migrations Generator\n\n[![Build Status](https:\u002F\u002Ftravis-ci.org\u002FXethron\u002Fmigrations-generator.svg)](https:\u002F\u002Ftravis-ci.org\u002FXethron\u002Fmigrations-generator)\n[![Scrutinizer Code Quality](https:\u002F\u002Fscrutinizer-ci.com\u002Fg\u002FXethron\u002Fmigrations-generator\u002Fbadges\u002Fquality-score.png?s=41d919c6d044749cb8575bb936efbddc4cebc0d8)](https:\u002F\u002Fscrutinizer-ci.com\u002Fg\u002FXethron\u002Fmigrations-generator\u002F)\n[![Latest Stable Version](https:\u002F\u002Fposer.pugx.org\u002Fxethron\u002Fmigrations-generator\u002Fv\u002Fstable.png)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fxethron\u002Fmigrations-generator)\n[![Total Downloads](https:\u002F\u002Fposer.pugx.org\u002Fxethron\u002Fmigrations-generator\u002Fdownloads.png)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fxethron\u002Fmigrations-generator)\n[![License](https:\u002F\u002Fposer.pugx.org\u002Fxethron\u002Fmigrations-generator\u002Flicense.png)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fxethron\u002Fmigrations-generator)\n\nGenerate Laravel Migrations from an existing database, including indexes and foreign keys!\n\n## Upgrading to Laravel 5.4\n\nPlease note that the Laravel 4 Generator edits have been moved to `https:\u002F\u002Fgithub.com\u002Fxethron\u002FLaravel-4-Generators.git` to update compatibility.\n\n## Laravel 5 installation\n\nThe recommended way to install this is through composer:\n\n```bash\ncomposer require --dev \"xethron\u002Fmigrations-generator\"\n```\n\nIn Laravel 5.5 the service providers will automatically get registered. \n\nIn older versions of the framework edit `config\u002Fapp.php` and add this to providers section:\n\n```php\nWay\\Generators\\GeneratorsServiceProvider::class,\nXethron\\MigrationsGenerator\\MigrationsGeneratorServiceProvider::class,\n```\nIf you want this lib only for dev, you can add the following code to your `app\u002FProviders\u002FAppServiceProvider.php` file, within the `register()` method:\n\n```php\npublic function register()\n{\n    if ($this->app->environment() !== 'production') {\n        $this->app->register(\\Way\\Generators\\GeneratorsServiceProvider::class);\n        $this->app->register(\\Xethron\\MigrationsGenerator\\MigrationsGeneratorServiceProvider::class);\n    }\n    \u002F\u002F ...\n}\n```\n\nNotes:\n* Thanks to @jamisonvalenta, you can now generate Migrations in Laravel 5!\n* `feature\u002Flaravel-five-stable` was forked from `way\u002Fgenerators` `3.0.3` and was made Laravel `5.0` ready. Jeffrey Way has discontinued support for Laravel 5, so the other `artisan generate:` commands may not have been made `5.0` compatible.  Investigate the `artisan make:` commands for substitutes, contribute to Laravel to extend generation support, or fix it and submit a PR to `jamisonvalenta\u002Ffeature\u002Flaravel-five-stable`.\n\n## Laravel 4 installation\n\nRun the following composer command:\n\n```bash\ncomposer require --dev \"xethron\u002Fmigrations-generator:~1.3.0\"\n```\n\nNext, add the following service providers:\n\n```php\n'Way\\Generators\\GeneratorsServiceProvider',\n'Xethron\\MigrationsGenerator\\MigrationsGeneratorServiceProvider',\n```\n\nAnd you're set. To double check if its working, run `php artisan`, and look for the command `migrate:generate`\n\n## Usage\n\nTo generate migrations from a database, you need to have your database setup in Laravel's Config.\n\nRun `php artisan migrate:generate` to create migrations for all the tables, or you can specify the tables you wish to generate using `php artisan migrate:generate table1,table2,table3,table4,table5`. You can also ignore tables with `--ignore=\"table3,table4,table5\"`\n\nLaravel Migrations Generator will first generate all the tables, columns and indexes, and afterwards 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.\n\nYou can also specify the connection name if you are not using your default connection with `--connection=\"connection_name\"`\n\nRun `php artisan help migrate:generate` for a list of options.\n\nCheck out Chung Tran's blog post for a quick step by step introduction: [Generate Migrations from an existing database in Laravel 4](http:\u002F\u002Fcodingtip.blogspot.com\u002F2014\u002F04\u002Flaravel-4-generate-migration-existed-dabase-laravel-4.html)\n\n## Changelog\n\nChangelog for Laravel Migrations Generator\n\n### 20 November 2016: v2.0.0\n* Support for Laravel 5\n\n### 20 November 2016: v1.3.0\n* Add options --defaultIndexNames and --defaultFKNames to use Laravel's default generated names\n* --no-interaction support\n* Migrate table field comments\n* Add connection to migrations if its not the default\n* Bugfix:\n  * --ignore doesn't ignoring the first table in the list\n  * Remove backticks from index names #17\n  * Drop foreign keys used incorrect key name #34\n  * Remove table prefix from migrations\n  * Escape table names and args\n  * Map JSON columns as text\n  * Boolean default results in empty string\n\n### 25 July: v1.2.2\n* Support for Laravel 4.2\n* Support for named foreign keys\n* Fix error with --ignore option\n\n### 29 May: v1.2.1\n* Fixed problem with char fields showing up as varchar\n* Allow decimal, float, and double to be unsigned\n* Allow cascading on foreign key update\u002Fdelete\n\n### 16 May: v1.2.0\n* Now fully supports for enum fields\n* Add support for bit fields as Boolean (Laravel Migration Limitation)\n\n### 10 May: v1.1.1\n* Fix crash when migrating tables that use enum\n* Added Tests\n* Major refactoring of the code\n\n### 24 March: v1.1.0\n* Ability to add entries into the Migrations Table, so that they won't be run as they already exist.\n* Convert Blobs to Binary fields\n* Minor Code Changes\n\n## Thank You\n\nThanks to Jeffrey Way for his amazing Laravel-4-Generators package. This package depends greatly on his work.\n\n## Contributors\n\nBernhard Breytenbach ([@BBreyten](https:\u002F\u002Ftwitter.com\u002FBBreyten))\n\n## License\n\nThe Laravel Migrations Generator is open-sourced software licensed under the [MIT license](http:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n","Laravel Migrations Generator 是一个能够根据现有数据库结构自动生成 Laravel 迁移文件的工具。其核心功能包括自动检测并生成包含索引和外键在内的完整迁移脚本，极大简化了开发者在项目初始化或重构时的工作量。该工具基于 PHP 开发，并兼容 Laravel 框架多个版本，支持通过 Composer 方便地安装与集成。适用于需要将已有数据库结构快速转换为 Laravel 迁移格式的各种开发场景，特别是在接手遗留系统或将非 Laravel 项目迁移到 Laravel 生态时尤为有用。",2,"2026-06-11 03:18:29","top_language"]