Reputation: 454
When I use ./bin/console doctrine:migrations:migrate
command my migrations apply to public
schema. But in my Entities I set another schema :
/**
* @ORM\Entity(repositoryClass="App\Repository\MyEntityRepository")
* @ORM\Table(schema="schemaname", name="entity")
*/
class MyEntity
How can I specify to what schema I need to apply my migration using Symfony doctrine?
Upvotes: 1
Views: 1358
Reputation: 2072
Use this configuration in your doctrine bundle configuration
doctrine_migrations:
...
table_name: myschema.migration_version
...
Oficial documentation in https://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html#configuration
Upvotes: 1