1

I want to use Doctrine Migrations with existing database. Table names in this database has a dash, for example: calendar-history

I use doctrine:mapping:import command to create entities from database and it works well. Then I want to create first migration, so I use doctrine:migrations:diff. And then I have a problem because it creates queries without quotes, like:

ALTER TABLE calendar-history DROP FOREIGN KEY calendar-history_ibfk_2

I've tried to:

  1. Add quotes to entity definition: @ORM\Table(name="`calendar-history`",
  2. Add a custom QuoteStrategy class

... and it works only with queries in down() method. The queries in up() method in the migration still are without quotes.

Any help?

tnx
  • 13
  • 4

0 Answers0