bcleverly / migrationtosql
This is my package MigrationToSql
0.2.0
2021-08-08 14:57 UTC
Requires
- php: ^8.0
- doctrine/sql-formatter: ^1.1
- illuminate/contracts: ^8.53
- illuminate/database: ^8.53
- spatie/laravel-package-tools: ^1.9.0
Requires (Dev)
- brianium/paratest: ^6.3
- nunomaduro/collision: ^5.6
- orchestra/testbench: ^6.19
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.9.2
This package is auto-updated.
Last update: 2025-03-09 18:32:44 UTC
README
To install:
composer require bcleverly/migrationtosql --dev
This repo is here to help you extract the SQL queries from your registered migration files. Running the below command will output each migration file in the order they're registered.
php artisan migrate:to-sql
Below is an example of the output of the CreateUsersTable
-- CreateUsersTable -- \laravelapp\database\migrations/2014_10_12_000000_create_users_table.php create table `users` ( `id` bigint unsigned not null auto_increment primary key, `name` varchar(255) not null, `email` varchar(255) not null, `email_verified_at` timestamp null, `password` varchar(255) not null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null ) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
Testing
TODO
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.