Skip to content

Bundle for Symfony2 and Doctrine2 that allow prefixing yours databases tables.

License

Notifications You must be signed in to change notification settings

pepeh/DoctrineTablePrefixBundle

 
 

Repository files navigation

DoctrineTablePrefixBundle

Bundle for Symfony2 and Doctrine2 that allow prefixing yours databases tables.

SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License

Installation

First: Download DoctrineTablePrefixBundle using composer

By adding this :

Add DoctrineTablePrefixBundle in your composer.json:

{
    "require": {
        "th3mouk/doctrine-table-prefix-bundle": "~1.0"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update th3mouk/doctrine-table-prefix-bundle

Composer will install the bundle to your project's vendor/Th3mouk directory.

Or simply by typing this command :

$ php composer.phar require th3mouk/doctrine-table-prefix-bundle:~1.0

Second : Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Th3mouk\DoctrineTablePrefixBundle\Th3moukDoctrineTablePrefixBundle(),
    );
}

Finally : Choose your prefix

Default prefix is "sf2_".

You can change the prefix in your configuration:

# app/config/config.yml
th3mouk_doctrine_table_prefix:
    prefix: sf2_

About

Bundle for Symfony2 and Doctrine2 that allow prefixing yours databases tables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%