You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the comment in mautic/mautic#9709 (comment) we should update the docs to include instructions for new migrations changing schema introduced in M2 to account for the fact that it was decided that we would not introduce a migration to migrate all signed integers to unsigned because the migration would be massive.
Such migrations should check to see if the other side of the constraint is signed or not (such as the one introduced in #9544). For example, migration Version20210104171005 would need something like this (not tested)
$categoryIdColumn = $schema->getTable("{$this->prefix}categories")->getColumn('id');
if ($categoryIdColumn->getUnsigned()) {
$this->addSql("ALTER TABLE {$this->prefix}lead_lists ADD category_id INT UNSIGNED DEFAULT NULL");
} else {
$this->addSql("ALTER TABLE {$this->prefix}lead_lists ADD category_id INT DEFAULT NULL");
}
The text was updated successfully, but these errors were encountered:
There also needs to be a note about naming foreign constraints and indexes. Doctrine generates the name based on the table name. So if someone is using a different table prefix, Doctrine will generate a different name. This will become problematic when doctrine:schema:update is ran and/or a later migration tries to modify an index or constraint by name that may not exist.
Per the comment in mautic/mautic#9709 (comment) we should update the docs to include instructions for new migrations changing schema introduced in M2 to account for the fact that it was decided that we would not introduce a migration to migrate all signed integers to unsigned because the migration would be massive.
Such migrations should check to see if the other side of the constraint is signed or not (such as the one introduced in #9544). For example, migration Version20210104171005 would need something like this (not tested)
The text was updated successfully, but these errors were encountered: