abmundi/database-commands-bundle
Symfony bundle to automate MySQL database dumps and imports via a db:dump console command and Capifony tasks. Creates timestamped dumps (with hard link to latest), supports download from remote and import into local production/testing environments.
This bundle provides a way to run a series of cdatabase commands in your Symfony application. It provides one command line for our console, and 5 capifony tasks.
Add the following code to your composer.json:
"require": {
...
"abmundi/database-commands-bundle": "dev-master",
...
},
Run a Composer update
$ php composer.phar update
Add the following code to your deps file:
[ABMundiDatabaseCommandsBundle]
git=git://github.com/ABMundi/DatabaseCommands.git
target=bundles/Abmundi/DatabaseCommandsBundle
And then run the vendors install command:
$ ./bin/vendors install
Then register the autoloader in the autoload.php file:
$loader->registerNamespaces(array(
...
'Abmundi' => __DIR__.'/../vendor/bundles',
...
));
Register the bundle in the AppKernel.php file:
public function registerBundles()
{
$bundles = array(
...
new Abmundi\DatabaseCommandsBundle\AbmundiDatabaseCommandsBundle(),
...
);
return $bundles;
}
This bundle needs (in local and remote server)
Now from your console you can run
./app/console db:dump
and see that a new file has been saved in folder /app/tmp/dump with an hard link to the newest one.
If you have installed capifony (http://capifony.org/) this bundle provides to you 6 nice tasks:
How can I help you explore Laravel packages today?