rinusser / phinxdump Goto Github PK
View Code? Open in Web Editor NEWcreates Phinx database migration classes from live MySQL databases
License: GNU General Public License v3.0
creates Phinx database migration classes from live MySQL databases
License: GNU General Public License v3.0
Currently the MigrationCodeGenerator class works but handles all object, column etc. types in the same class resulting in code changes that aren't necessarily more readable just to comply with code complexity rules.
Refactor MigrationCodeGenerator into separate classes. At least extract an abstract column code generator and move column-specific code into its child classes.
Currently the generated migration code works but violates a few code style rules (at least commenting and root namespace).
Test as many supported db schemata as possible and change the migration code generator to produce code without styling violations.
Currently empty schemas result in an empty migration class being generated. This seems useless.
Add a content check: if there's nothing to migrate, don't write the migration file and log a message instead. Add a command line option to still generate the empty migration class.
If the schema consists of views only (which currently result in a comment line in the migration file) consider the schema to be populated and write the migration file as usual.
Currently the basic usage is documented in README.md, with command line arguments only explained on error.
Add more detailed command line documentation in README.md and a help screen triggered by at least --help
and -h
.
Currently character sets and collations are ignored: when running a migration the target server's defaults are used. As a result the original, sometimes purposefully selected, character sets and collations will be lost.
Check if Phinx supports specifying character sets and collations - if so, implement them. If not, see what useful warnings/errors could be emitted.
Currently storage engines are completely ignored when reverse-engineering a live database. As a result when executing the migration the newly created tables will use the database's default storage engine.
Add support for keeping storage engines: when creating a migration class the tables' original storage engines should be preserved.
Also add an option to migrate old databases from MyISAM to InnoDB (maybe even make this mode default): storage engines other than MyISAM should be kept, MyISAM should be converted to InnoDB with an appropriate comment in the generated code.
Currently dumping a TIMESTAMP NOT NULL column results in "0000-00-00 00:00:00" being used as the column's default. This isn't valid, generated migration files will fail because of it.
Drop this default value if encountered. See if the other temporal column types are similarly affected, fix them too if so.
Currently string/text columns always have their character set and collations specified, even if they match the table's defaults.
Make sure Phinx doesn't output any implicit character sets or collations, then implement removing unnecessary character sets and collations from columns.
Currently the code is marked as proprietary and resides in a private repository.
Change the licensing to GPLv3, squash existing commits and publish the code.
Currently the files don't contain any links back to this repository and the repository itself isn't particularly easy to find.
Improve this:
Currently the copyright year is listed as 2017 and this is OK for now.
There are planned changes, once they are added update the copyright year as well.
Currently the database schema is exported, but there's no built-in way of handling content data.
Add a way. At least implement creating seed file helpers that don't necessarily come with data but include helper functions to generate data fitting the schema easily.
Currently indices and unique constraints are dumped and included in the migration class, foreign keys are not.
Add foreign key support - make sure the tables are created in order, probably by creating everything first, then adding the foreign keys later.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.