linkorb/database-manager
Composer 安装命令:
composer require linkorb/database-manager
包简介
Database Management utilities: connectivity, backups, fixtures, etc
README 文档
README
Database Manager helps developers manage their dev/test/prod databases.
Features:
- Load database connection configuration
- Instantiate PDO connections
Database Manager can be used both as a command-line utility as a PHP library.
Suggestions
- https://github.com/dbtk/schema-loader - to load schemas
- https://github.com/linkorb/haigha - to load alice fixtures
Installation
Composer
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 require section:
"linkorb/database-manager": "~2.0"
Then run composer update to install the new dependency
Git
Use this installation path if you wish to use Database Manager as a stand-alone utility.
Checkout the code from Github:
git clone git@github.com:linkorb/database-manager.git
cd database-manager
composer install # install dependencies
./bin/database-manager # list command-line options
Database configuration files
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
Note that port key is optional.
Store your database in /share/config/database/[databasename].conf
Command-line options
bin/database-manager connection:config [dbname]
This will load the configuration from /share/config/database/[databasename].conf, and display it on the console.
Examples
Please refer to the examples/ directory for:
- Example database .conf file
Testing
Install phpunit and copy phpunit.xml.dist to phpunit.xml:
cp phpunit.xml.dist phpunit.xml
Type phpunit in terminal to run tests.
Contributing
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.
License
Please check LICENSE.md for full license information
Brought to you by the LinkORB Engineering team
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!
linkorb/database-manager 适用场景与选型建议
linkorb/database-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 108.53k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2014 年 08 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「php」 「fixtures」 「api」 「mysql」 「doctrine」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 linkorb/database-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 linkorb/database-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 linkorb/database-manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Testing object factory for PHP
Testing object factory for PHP
Store your language lines in the database, yaml or other sources
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Plugin to compare fixtures with live DB tables
统计信息
- 总下载量: 108.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 25
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-20