Open enygma opened 9 years ago
The migrations themselves have been updated to work with the DB_PREFIX
setting via a parent class. Additionally, the base Mysql
model and collection now respect the prefix for getting class names. The only thing left is changing the manual queries...
Oh, and the Phinx project has a PR I submitted to support bootstraping. In my testing I'm using this to set the needed superglobal value but I might have to find another way as it doesn't look like it'll be accepted anytime soon.
Apparently you can also use a .php
file as a configuration for Phinx...might need to go that way with it.
Currently the Gatekeeper tables are relatively commonly named (
users
,groups
, etc) and those could conflict with a system's current tables. A prefix option should be added to the.env
handling allowing the prefix to be included on the tables. If no prefix is defined, it will revert to the current default table names.Consider possibly adding the ability to migrate the data structure too, adding a method that would check for a prefix and, if found and not currently in use, use a
SELECT INTO
or something similar to migrate each of the tables. A special set of Phinx migrations could be included for this too.