title: Doctrine Migrations not creating join table
body: <p>I'm trying to create a join table between two entities using Doctrine ORM and the Symfony maker bundle.</p>
  <p>The two entities are <code>User</code> and <code>Member</code>. A <code>User</code> should be able to reference multiple <code>Member</code> entities, and <code>Member</code> entities can be referenced by multiple users.</p>
  <p>User:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  namespace App\Entity;
  
  use App\Repository\UserRepository;
  use Doctrine\Common\Collections\ArrayCollection;
  use Doctrine\ORM\Mapping as ORM;
  
  #[ORM\Entity(repositoryClass: UserRepository::class)]
  class User
  {
      public function __construct(
          #[ORM\Id]
          #[ORM\Column(type: 'string', length: 255)]
          public readonly string $username,
  
          #[ORM\ManyToMany(targetEntity: Member::class, mappedBy: 'name')]
          #[ORM\JoinTable(
              name: 'tracked_members',
              joinColumns: [
                  new ORM\JoinColumn(name: 'user', referencedColumnName: 'username'),
              ],
              inverseJoinColumns: [
                  new ORM\JoinColumn(name: 'member', referencedColumnName: 'name'),
              ],
          )]
          public ArrayCollection $tracked_members,
      ) {
      }
  }
  </code></pre>
  <p>Member:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  namespace App\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use App\Repository\MemberRepository;
  
  #[ORM\Entity(repositoryClass: MemberRepository::class)]
  class Member
  {
      public function __construct(
          #[ORM\Id]
          #[ORM\Column(type: 'string', length: 255)]
          public readonly string $name,
      ) {
      }
  }
  </code></pre>
  <p>However, when I run <code>./bin/console make:migration</code>, I receive the following migration class with no warnings or errors indicating a problem:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  declare(strict_types=1);
  
  namespace DoctrineMigrations;
  
  use Doctrine\DBAL\Schema\Schema;
  use Doctrine\Migrations\AbstractMigration;
  
  /**
   * Auto-generated Migration: Please modify to your needs!
   */
  final class Version20220705021447 extends AbstractMigration
  {
      public function getDescription(): string
      {
          return '';
      }
  
      public function up(Schema $schema): void
      {
          // this up() migration is auto-generated, please modify it to your needs
          $this-&gt;addSql('CREATE TABLE member (name VARCHAR(255) NOT NULL, PRIMARY KEY(name))');
          $this-&gt;addSql('CREATE TABLE user (username VARCHAR(255) NOT NULL, PRIMARY KEY(username))');
      }
  
      public function down(Schema $schema): void
      {
          // this down() migration is auto-generated, please modify it to your needs
          $this-&gt;addSql('DROP TABLE member');
          $this-&gt;addSql('DROP TABLE user');
      }
  }
  </code></pre>
  <p>Why isn't the SQL to create the join table <code>tracked_users</code> being added to the migration class?</p>
  <p>Other relevant info:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Dependency</th>
  <th>Version</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>PHP</td>
  <td>8.1.7</td>
  </tr>
  <tr>
  <td>SQLite</td>
  <td>3.37.0</td>
  </tr>
  <tr>
  <td>doctrine/doctrine-migrations-bundle</td>
  <td>3.2.2</td>
  </tr>
  <tr>
  <td>doctrine/orm</td>
  <td>2.13.3</td>
  </tr>
  <tr>
  <td>symfony/maker-bundle</td>
  <td>1.43.0</td>
  </tr>
  </tbody>
  </table>
  </div>