https://github.com/g4code/db-tools
https://github.com/g4code/db-tools
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/g4code/db-tools
- Owner: g4code
- Created: 2017-01-24T15:01:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-08T08:57:57.000Z (over 2 years ago)
- Last Synced: 2025-10-20T08:02:56.496Z (4 months ago)
- Language: PHP
- Size: 21.5 KB
- Stars: 1
- Watchers: 10
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# db-tools
Usage
Inside project folder, it's required to create this set of folders
```text
db/
dumps/
logs/
migrations/
default/
```
Root folder may be configured with parameter `ruckusing_dir`.
Command line has some required options:
```
ini - Relative path to application.ini which contain's database configuration files
env - Environment which will be read from application.ini
sql-dump - Relative path to SQL file that needs to be imported
ruckusing_dir - dir name of where database and migration related files are
```
Example:
```text
php vendor/g4/db-tools/bin/tools.php import:data env=$(env) sql-dump=${ND_API_SQL_DUMP} ini=${APPLICATION_INI} ruckusing_dir=${RUCKUSING_DIR}
```
```text
php vendor/g4/db-tools/bin/ruckus.php db:status env=$(env) ini=${APPLICATION_INI} ruckusing_dir=${RUCKUSING_DIR}
```
This variables should be defined inside Makefile like:
```
APPLICATION_INI = application/setup/config/application.ini
RUCKUSING_DIR = db
ND_API_SQL_DUMP = $(RUCKUSING_DIR)/dumps/nd_api_v1.0.0.sql
GEONAME_SQL_DUMP = $(RUCKUSING_DIR)/dumps/geoname.compact.sql
```
Import db-tools makefile targets into project's Makefile with
```
include vendor/g4/db-tools/dbtools.mk
```