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

Changed table collation does not trigger schema update when using doctrine:schema:update #2665

Open
podorozhny opened this issue Feb 28, 2017 · 3 comments

Comments

@podorozhny
Copy link

Hello.

When I change table collation (using @ORM\Table annotation) - doctrine:schema:update do not update it. But if I do doctrine:schema:drop before update - it will update it.

Platform: postgres 9.6

@Ocramius
Copy link
Member

Possibly related: #2551

@Tobion
Copy link
Contributor

Tobion commented Aug 3, 2017

Ref. doctrine/orm#2988

@morozov morozov linked a pull request Aug 23, 2021 that will close this issue
@morozov morozov removed a link to a pull request Aug 25, 2021
@morozov
Copy link
Member

morozov commented Aug 25, 2021

Steps to reproduce:

$desiredTable = new Table('test', [new Column('id', new StringType())]);
$desiredTable->addOption('charset', 'utf8mb4');
$desiredTable->addOption('collate', 'utf8mb4_bin');

$sm = $connection->createSchemaManager();
$sm->dropAndCreateTable($desiredTable);

$desiredTable->addOption('collate', 'utf8mb4_unicode_ci');

$actualTable = $sm->listTableDetails('test');

$comparator = $sm->createComparator();
$diff = $comparator->diffTable($actualTable, $desiredTable);
var_dump($diff);
// false

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

No branches or pull requests

4 participants