{"id":16078525,"url":"https://github.com/romanzipp/laravel-migration-generator","last_synced_at":"2025-03-18T05:31:35.106Z","repository":{"id":40448023,"uuid":"235695362","full_name":"romanzipp/Laravel-Migration-Generator","owner":"romanzipp","description":"⚠️ WIP ⚠️ - Generate Laravel migration files from existing databases","archived":false,"fork":false,"pushed_at":"2023-02-15T12:40:59.000Z","size":93,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T07:35:53.370Z","etag":null,"topics":["database","laravel","php","php7","showcase"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/romanzipp/laravel-migration-generator","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romanzipp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"romanzipp"}},"created_at":"2020-01-23T00:27:00.000Z","updated_at":"2022-03-25T07:32:50.000Z","dependencies_parsed_at":"2024-10-27T17:22:23.124Z","dependency_job_id":"1d14d20c-36e8-40e8-9404-652075435b41","html_url":"https://github.com/romanzipp/Laravel-Migration-Generator","commit_stats":{"total_commits":136,"total_committers":2,"mean_commits":68.0,"dds":"0.044117647058823484","last_synced_commit":"6dc2cd1299e276861ae1b6035285db51629a0db4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Migration-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Migration-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Migration-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romanzipp%2FLaravel-Migration-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romanzipp","download_url":"https://codeload.github.com/romanzipp/Laravel-Migration-Generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243903201,"owners_count":20366440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","laravel","php","php7","showcase"],"created_at":"2024-10-09T10:13:25.062Z","updated_at":"2025-03-18T05:31:34.194Z","avatar_url":"https://github.com/romanzipp.png","language":"PHP","funding_links":["https://github.com/sponsors/romanzipp"],"categories":[],"sub_categories":[],"readme":"# Laravel Migration Generator\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/romanzipp/laravel-migration-generator.svg?style=flat-square)](https://packagist.org/packages/romanzipp/laravel-migration-generator)\n[![Total Downloads](https://img.shields.io/packagist/dt/romanzipp/laravel-migration-generator.svg?style=flat-square)](https://packagist.org/packages/romanzipp/laravel-migration-generator)\n[![License](https://img.shields.io/packagist/l/romanzipp/laravel-migration-generator.svg?style=flat-square)](https://packagist.org/packages/romanzipp/laravel-migration-generator)\n[![GitHub Build Status SQLite](https://img.shields.io/github/actions/workflow/status/romanzipp/Laravel-Migration-Generator/tests-sqlite.yml?branch=master\u0026style=flat-square\u0026label=SQLite)](https://github.com/romanzipp/Laravel-Migration-Generator/actions)\n[![GitHub Build Status MySQL](https://img.shields.io/github/actions/workflow/status/romanzipp/Laravel-Migration-Generator/tests-mysql.yml?branch=master\u0026style=flat-square\u0026label=MySQL)](https://github.com/romanzipp/Laravel-Migration-Generator/actions)\n[![GitHub Build Status MariaDB](https://img.shields.io/github/actions/workflow/status/romanzipp/Laravel-Migration-Generator/tests-mariadb.yml?branch=master\u0026style=flat-square\u0026label=MariaDB)](https://github.com/romanzipp/Laravel-Migration-Generator/actions)\n\n### ⚠️ **WORK IN PROGRESS** ⚠️\n\nGenerate Laravel migration files from existing databases.\n\n## Installation\n\n```\ncomposer require romanzipp/laravel-migration-generator\n```\n\n**If you use Laravel 5.5+ you are already done, otherwise continue.**\n\nAdd Service Provider to your `app.php` configuration file:\n\n```php\nromanzipp\\MigrationGenerator\\Providers\\MigrationGeneratorProvider::class,\n```\n\n## Configuration\n\nCopy configuration to config folder:\n\n```\n$ php artisan vendor:publish --provider=\"romanzipp\\MigrationGenerator\\Providers\\MigrationGeneratorProvider\"\n```\n\n## Usage\n\n```shell\nphp artisan mg:generate {--connection=}\n```\n\nYou will see various new migration files prefixed with the current time \u0026 date.\n\n**Notice**: This package can't guess the order in which migrations will be created. If you've created some foreign keys in your database, be sure to re-order the migration files based on these relations.\n\n## Supported Databases\n\n- MySQL\n- MariaDB\n- SQLite ([Info on Datatypes](https://www.sqlite.org/datatype3.html))\n\n## Features\n\n- [x] Tables\n- [x] Columns\n- [x] Column modifiers (nullable, default, ...)\n- [ ] Indexes\n- [ ] Foreign keys\n\n## Testing\n\nThere are [tests](https://github.com/romanzipp/Laravel-Migration-Generator/actions) with the following matrix.\n\n- **PHP**\n  - 7.2\n  - 7.3\n  - 7.4\n  - 8.0\n  - 8.1\n  - 8.2\n- **Databases**\n  - SQLite\n  - MySQL\n  - MariaDB\n- **Composer dependency versions**\n  - latest\n  - lowest\n\n### SQLite\n\n```\n./vendor/bin/phpunit\n```\n\n### MySQL / MariaDB\n\n*Requires a running MySQL / MariaDB server*\n\n```\n./vendor/bin/phpunit -c phpunit.mysql.xml\n```\n\n#### Provide database environment variables \n\n```\nDB_HOST=127.0.0.1 DB_USERNAME=user DB_PASSWORD=secret ./vendor/bin/phpunit -c phpunit.mysql.xml\n```\n\n## Known issues\n\n- *MariaDB*: The `JSON` MySQL data type is not supported since Doctrine/DBAL interprets this as `Doctrine\\DBAL\\Types\\TextType`\n- *MySQL*: Doctrine/DBAL can't differentiate between TEXT, LONGTEXT, MEDIUMTEXT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromanzipp%2Flaravel-migration-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromanzipp%2Flaravel-migration-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromanzipp%2Flaravel-migration-generator/lists"}