g4 / db-tools
Database migration related tools
Installs: 36 806
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 12
Forks: 3
Open Issues: 0
Requires
- php: >=8.2
- g4/config: >=2.0.0
- g4/ruckusing-migrations: 2.*
README
Usage
Inside project folder, it's required to create this set of folders
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:
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}
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