Download the PHP package clouddueling/auto-migrate without Composer
On this page you can find all versions of the php package clouddueling/auto-migrate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clouddueling/auto-migrate
More information about clouddueling/auto-migrate
Files in clouddueling/auto-migrate
Package auto-migrate
Short Description This class can be used to generate diffs between a MySQL XML dump file, and a database which currently exists. It will tell you the missing tables and columns (return as an array), or generate MySQL queries to add the missing columns in.
License MIT
Informations about the package auto-migrate
WARNING
This project is brand new but will be quickly maturing if it proves to be a big timesaver.
This class can be used to generate diffs between a MySQL XML dump file, and a database which currently exists. It will tell you the missing tables and columns (return as an array), or generate MySQL queries to add the missing columns in.
Getting Started
-
Install via composer:
-
Export your database to XML schema files.
Your output should look like:
The XML files outputted will be how you manage what your database looks like from now on.
-
When you make a change to your schema files you then use
CloudDueling\AutoMigrate\MySQL
and to loop through each schema file and to alter your database.Example of available methods:
Example looping through a directory of schemas and update your database with them.
Laravel 4 Task
Laravel 3 Task
Todo
- UPGRADE TO PDO!!!! (original script is dependent on mysql_connect, maybe Eloquent?)
- Create example artisan tasks for Laravel 3 and 4
- Create a class that can generate a skeleton XML file for new tables
- Support table engines changing from MyISAM to InnoDB
- Create an adapter that can create migrations for up and down
- Add to Travis
- Implement an interface encouraging hexagonal structure
- Remove 'db' from the parameters for connecting
- Extract the deeply nested loops to smaller understandable classes.
Goals
- Allow for future database types to be able to use this with their own class and export script.
- PSR compliant
Contributing
Please create an issue first with your idea or bug for discussion so no one codes unnecessarily.
Credits
Much thanks to Nabeel Shahzad who originally wrote this class.
License
The MIT License (MIT). Please see License File for more information.