speedwork / database
This package is abandoned and no longer maintained.
No replacement package was suggested.
Speedwork database Library
v1.0.4
2017-07-29 11:27 UTC
Requires
- php: >=5.6
- doctrine/dbal: ^2.5
- speedwork/console: ^1.0
- speedwork/core: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- jakub-onderka/php-console-highlighter: ^0.3.2
- jakub-onderka/php-parallel-lint: ^0.9.2
- ocramius/proxy-manager: ^1.0
- phpmd/phpmd: ^2.4
- phpro/grumphp: ^0.9.6
- phpstan/phpstan: ^0.5
- phpunit/php-code-coverage: ^5.2
- phpunit/phpunit: ~6.2
- satooshi/php-coveralls: 2.*
- sebastian/phpcpd: ^3.0
- sensiolabs/security-checker: ^3.0
- squizlabs/php_codesniffer: ~2.3
This package is not auto-updated.
Last update: 2018-08-08 05:24:59 UTC
README
=============================================
Sample Connection Configuration
'sample' => [ 'driver' => 'mysqli', 'persistent' => false, 'host' => env('DB_HOST', '127.0.0.1'), 'database' => env('DB_DATABASE', 'speedwork'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => env('DB_PREFIX', 'speed_'), ], // With failover connection 'sample1' => [ 'driver' => 'mysqli', 'persistent' => false, 'host' => env('DB_HOST', '127.0.0.1'), 'database' => env('DB_DATABASE', 'speedwork'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => env('DB_PREFIX', 'speed_'), 'masters' => [ ['host' => '172.16.1.207'], ['host' => '172.16.1.184'], ], ], 'master' => [ 'driver' => 'mysqli', 'persistent' => false, 'wrapper' => 'MasterSlave', 'database' => env('DB_DATABASE', 'speedwork'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => env('DB_PREFIX', 'speed_'), 'master' => [ 'host' => '172.16.1.213', ], 'slaves' => [ ['host' => '172.16.1.207'], ['host' => '172.16.1.184'], ], 'connections' => [ 'select' => 'slave', 'update' => 'master', 'other' => 'master', ], ], 'master' => [ 'driver' => 'mysqli', 'persistent' => false, 'wrapper' => 'MasterSlaveExtended', 'database' => env('DB_DATABASE', 'speedwork'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => env('DB_PREFIX', 'speed_'), 'master' => [ 'host' => '172.16.1.213', ], 'slaves' => [ ['host' => '172.16.1.207'], ['host' => '172.16.1.184'], ], 'connections' => [ 'types' => [ 'select' => 'slave', 'update' => 'master', 'other' => 'master', ], 'patterns' => [ 'table_name' => 'salve' ] ], ],
#Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Make your changes
- Run the tests, adding new ones for your own code if necessary (
phpunit
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request