Database Management utilities: connectivity, backups, fixtures, etc
Database Manager helps developers manage their dev/test/prod databases.
- Load database connection configuration
- Instantiate PDO connections
Database Manager can be used both as a command-line utility as a PHP library.
- https://github.com/dbtk/schema-loader - to load schemas
- https://github.com/linkorb/haigha - to load alice fixtures
Use this installation path if you wish to use Database Manager in your PHP project.
Add the following to your
composer.json file, in the
composer update to install the new dependency
Use this installation path if you wish to use Database Manager as a stand-alone utility.
Checkout the code from Github:
git clone firstname.lastname@example.org:linkorb/database-manager.git cd database-manager composer install # install dependencies ./bin/database-manager # list command-line options
Database connection information is stored in a simple .ini file. Here's a working example:
name = mydb server = localhost port = 3306 username = my_username password = my_password
port key is optional.
Store your database in
bin/database-manager connection:config [dbname]
This will load the configuration from
/share/config/database/[databasename].conf, and display it on the console.
Please refer to the
examples/ directory for:
- Example database .conf file
Install phpunit and copy
cp phpunit.xml.dist phpunit.xml
phpunit in terminal to run tests.
Ready to build and improve on this repo? Excellent! Go ahead and fork/clone this repo and we're looking forward to your pull requests! Be sure to update the unit tests in tests/.
If you are unable to implement changes you like yourself, don't hesitate to open a new issue report so that we or others may take care of it.
Please check LICENSE.md for full license information
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!