Bundle for Symfony2 and Doctrine2 that allow prefixing yours databases tables.
Using command line
composer require th3mouk/doctrine-table-prefix-bundleOr editing composer.json :
{
"require": {
"th3mouk/doctrine-table-prefix-bundle": "^1.0"
}
}Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Th3mouk\DoctrineTablePrefixBundle\Th3moukDoctrineTablePrefixBundle(),
// ...
);
}Default prefix is "sf2_".
You can change the prefix in your configuration:
# app/config/config.yml
th3mouk_doctrine_table_prefix:
prefix: sf2_