th3mouk/doctrine-table-prefix-bundle

此包已被弃用,不再维护。没有建议替代包。

用于Symfony2和Doctrine2的扩展包,允许为您的数据库表添加前缀。

1.0.1 2014-06-14 19:05 UTC

This package is auto-updated.

Last update: 2021-10-04 21:12:28 UTC


README

用于Symfony2和Doctrine2的扩展包,允许为您的数据库表添加前缀。

SensioLabsInsight Latest Stable Version Total Downloads Build Status Latest Unstable Version License

安装

第一步:使用composer下载DoctrineTablePrefixBundle

使用命令行

composer require th3mouk/doctrine-table-prefix-bundle

或者编辑composer.json

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

第二步:启用扩展包

在kernel中启用扩展包

<?php
// app/AppKernel.php

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

最后:选择前缀

默认前缀为"sf2_"。

您可以在配置中更改前缀

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