yuki777 / dbdb-php
Database version manager for MySQL, PostgreSQL, MongoDB & Redis
Installs: 52
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Shell
Type:composer-plugin
Requires
- composer-plugin-api: ^2.0
Requires (Dev)
- ext-pdo_mysql: *
- composer/composer: ^2.0
- phpunit/phpunit: ^10.0
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-11-25 22:29:09 UTC
README
dbdb-php is a plugin for composer that allows you to manage databases with dbdb.
Install
# Allow plugin composer config allow-plugins.yuki777/dbdb-php true # Install # Don't forget "--dev". Databases started by "dbdb-php" are not suitable for production. composer require --dev yuki777/dbdb-php
Usage
# Create database with version 5.7.31 and port 3306 composer dbdb:mysql create --db-name=my-awesome-db5 --db-version=5.7.31 --db-port=3306 # Start database composer dbdb:mysql start --db-name=my-awesome-db5 # Stop database composer dbdb:mysql stop --db-name=my-awesome-db5 # Restart database composer dbdb:mysql restart --db-name=my-awesome-db5 # Delete database composer dbdb:mysql delete --db-name=my-awesome-db5 # Create and start database composer dbdb:mysql create-start --db-name=my-awesome-db5 --db-version=5.7.31 --db-port=3306 # Create database with version 8.0.30 and random port composer dbdb:mysql create --db-name=my-awesome-db8 --db-version=8.0.30 --db-port=random # Show port composer dbdb:mysql-port my-awesome-db8 # Show databases composer dbdb:list
Supported databases and versions
- MySQL
- 5.7.31
- 8.0.30
- Redis
- 6.0.16
- 6.2.6
- Postgresql
- 12.4
- 12.6
- 13.2
- Mongodb
- 4.4.10
- 5.0.3
Example
- Here is an example of Laravel using a MySQL database without a MySQL container in CI (GitHub Actions).