Bug #93491
closedRemoved columns are not recognized when analyzing the database using PostgreSQL (and not renamed to zzz_deleted_)
100%
Description
If a column of a table has been removed in a ext_tables.sql
definition the according change to rename it adding the prefix zzz_deleted_
is not done on PostgreSQL.
How to reproduce:
1. Have TYPO3 installation running on a PostgreSQL database
2. Remove a column from an ext_tables.sql
definition, e.g. be_users.avatar
in sysext/core/ext_tables.sql
3. Go to "Maintenance" and click on "Analyze database"
4. There is no statement for renaming be_users.avatar
to be_users.zzz_deleted_avatar
This may lead to major issues if columns are removed which require a certain datatype that is not set as default, leading to making it impossible to add rows to the table.
Updated by Stephan Großberndt almost 4 years ago
- Related to Epic #90719: PostgreSQL related issues added
Updated by Stephan Großberndt almost 4 years ago
- Start date deleted (
2021-02-11)
The corresponding test has been intentionally disabled (which makes matters worse I think):
/**
* @test
* @group not-postgres
* @group not-mssql
* @group not-sqlite
*/
public function renameUnusedField()
{
$statements = $this->readFixtureFile('unusedColumn');
$updateSuggestions = $this->subject->getUpdateSuggestions($statements, true);
$this->subject->migrate(
$statements,
$updateSuggestions[ConnectionPool::DEFAULT_CONNECTION_NAME]['change']
);
self::assertFalse($this->getTableDetails()->hasColumn('hidden'));
self::assertTrue($this->getTableDetails()->hasColumn('zzz_deleted_hidden'));
}
Updated by Gerrit Code Review almost 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67752
Updated by Gerrit Code Review almost 4 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67772
Updated by Gerrit Code Review almost 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67772
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68013
Updated by Stephan Großberndt over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 154606e34b78f5b57801e2d4e81103a874332dbd.
Updated by Benni Mack over 3 years ago
- Related to Bug #93568: Revert database-related changes in Schema Diff / Migrator added
Updated by Oliver Hader over 3 years ago
Reopened since tests failed
./Build/Scripts/runTests.sh -p 7.4 -d mssql -s functional -e "--filter renameUnusedField" \ typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php
Reverted
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68056
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68114
Updated by Stephan Großberndt over 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset fd83ee6e9bae3d93ff3e60bd550426afd82d08f2.