Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Columns with type ascii_string wrongly added to migrations again and again #444

Open
fluffycondor opened this issue Oct 11, 2021 · 0 comments

Comments

@fluffycondor
Copy link

doctrine/doctrine-migrations-bundle 3.1.1
PostgreSQL 10.18

With the given code

class Foo {
    /**
     * @ORM\Id
     * @ORM\Column(type="ascii_string", unique=true)
     */
    private string $id;
}

I get these lines in my migrations again and again:

final class Version20211011123506 extends AbstractMigration
{
    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE foo ALTER id TYPE VARCHAR(255)');
        $this->addSql('ALTER TABLE foo ALTER id DROP DEFAULT');
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE foo ALTER id TYPE VARCHAR(255)');
        $this->addSql('ALTER TABLE foo ALTER id DROP DEFAULT');
    }
}

Looks like a bug to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant