PHPackages                             shoofly/doctrine-multi-schema-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. shoofly/doctrine-multi-schema-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

shoofly/doctrine-multi-schema-bundle
====================================

Enables multiple schemas for Doctrine + Symfony

v0.1.6(8y ago)02.3k[1 issues](https://github.com/smcjones/doctrine-multi-schema-bundle/issues)MITPHPPHP &gt;=5.6.0

Since Apr 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/smcjones/doctrine-multi-schema-bundle)[ Packagist](https://packagist.org/packages/shoofly/doctrine-multi-schema-bundle)[ RSS](/packages/shoofly-doctrine-multi-schema-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (9)Versions (8)Used By (0)

Enables Multiple Schemas for MySQL on Doctrine

*I created this bundle to fulfill a need for one of my projects. It is not thoroughly tested for all use cases, and will be regularly updated.*

*If you find this useful but spot a bug, I welcome PRs.*

The Premise
-----------

[](#the-premise)

Doctrine treats MySQL databases the same as PostgreSQL databases. The truth is that MySQL databases are closer in nature to a PostgreSQL schema, and the term `DATABASE` can be used interchangeably with `SCHEMA` in MySQL, [even in syntax](https://dev.mysql.com/doc/refman/5.7/en/create-database.html):

```
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name ...

```

This makes it very difficult to handle MySQL layouts that use more than one schema - often a reality in inherited code.

If your personal use case is transferring an existing project with multiple schemas into a Symfony project, and you'd like to use Doctrine, then this bundle seeks to make that possible.

Installation
------------

[](#installation)

In your Symfony project, install with

```
composer require shoofly/doctrine-multi-schema-bundle

```

Add to your Symfony AppKernel.php:

```
$bundles = [
    new Shoofly\DoctrineMultiSchemaBundle\ShooflyDoctrineMultiSchemaBundle(),
];

```

Configuraiton
-------------

[](#configuraiton)

**IMPORTANT:** Remove your driver and platform, and replace it with these two parameters.

```
doctrine:
    dbal:
        driver_class: 'Shoofly\DoctrineMultiSchemaBundle\DBAL\MySQL\Driver'
        platform_service: "shoofly_doctrine_multi_schema.platform57"
        # for MySQL < 5.7, choose this:
        # platform_service: "shoofly_doctrine_multi_schema.platform"

```

Next, list the schemas you want to include in your ORM:

```
shoofly_doctrine_multi_schema:
    schemas:
        - foo
        - baz
        - bar

```

That should be the only configuration you need. If you run into any issues, please let me know.

Hope this helps someone else. If not, it's already helped me :)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~62 days

Total

6

Last Release

3126d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6015579?v=4)[Sean](/maintainers/smcjones)[@smcjones](https://github.com/smcjones)

---

Top Contributors

[![smcjones](https://avatars.githubusercontent.com/u/6015579?v=4)](https://github.com/smcjones "smcjones (5 commits)")

---

Tags

bundledbaldoctrinemysqlsymfonysymfony-bundlesymfonybundlemysqldoctrinedbal

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/shoofly-doctrine-multi-schema-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/shoofly-doctrine-multi-schema-bundle/health.svg)](https://phpackages.com/packages/shoofly-doctrine-multi-schema-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
