Project

General

Profile

Actions

Bug #90754

closed

Database Compare with SQLite can not be finished

Added by Daniel Siepmann about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2020-03-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

With current master, and since some v10 releases already, I can't finish the database compare using SQLite.

I've attached a screenshot of the result when executing the compare, together with a file containing the output of the compare beforehand:

liayn1 8 minutes ago
I added a dummy column to the pages table locally and did a compare.
it showed me the option to rename the column to zzz_, this worked without errors.
Now I see the same suggestion again and additionally the statements to drop the zzz field.
So this is some different bug indeed


Files

Screenshot from 2020-03-13 09-29-37.png (128 KB) Screenshot from 2020-03-13 09-29-37.png Daniel Siepmann, 2020-03-13 10:01
compare.txt (111 KB) compare.txt Daniel Siepmann, 2020-03-13 10:01

Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #90758: Renaming of column does work in sqlite with db compareClosedMarkus Klein2020-03-13

Actions
Related to TYPO3 Core - Bug #94710: Database Compare "Change fields" with SQLite shows red errorUnder Review2021-08-04

Actions
Related to TYPO3 Core - Bug #94709: TypeError for SQLite in DB CompareClosedDaniel Siepmann2021-08-04

Actions
Follows TYPO3 Core - Bug #90751: database compare shows differences for fresh installationClosed2020-03-12

Actions
Actions #1

Updated by Gerrit Code Review about 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/+/63702

Actions #2

Updated by Markus Klein about 4 years ago

  • Follows Bug #90751: database compare shows differences for fresh installation added
Actions #3

Updated by Markus Klein about 4 years ago

The proposed patch solves the problem when a single field is to be renamed for a table, but does not solve the issue if multiple fields are to be changed.

The reason is hidden in
\TYPO3\CMS\Core\Database\Schema\ConnectionMigrator::getUnusedFieldUpdateSuggestions

There it says "// Treat each changed column with a new diff to get a dedicated suggestions just for this single column."

This works for DB-Systems which need only 1 statement to adjust the schema for each column, but fails on SQLite where a column rename is a series of at least 5 statements (via temporary table).

If one than more column for the same table needs to be renamed the subsequent statements are calculated without knowing about the changes from the first column to change. This leads to absolute chaos.

Two possible solutions for SQLite therefore are:
  1. Allow only a single field per table to be renamed at once
  2. Rename all fields per table at once (no individual choice possible for single fields)
Actions #4

Updated by Markus Klein about 4 years ago

  • Related to Bug #90758: Renaming of column does work in sqlite with db compare added
Actions #5

Updated by Mathias Brodala about 4 years ago

  • Description updated (diff)
Actions #6

Updated by Mathias Brodala about 4 years ago

  • Description updated (diff)
Actions #8

Updated by Gerrit Code Review about 4 years ago

Patch set 3 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/+/63702

Actions #9

Updated by Gerrit Code Review about 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/+/63712

Actions #10

Updated by Gerrit Code Review about 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/+/63712

Actions #11

Updated by Gerrit Code Review about 4 years ago

Patch set 3 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/+/63712

Actions #12

Updated by Gerrit Code Review about 4 years ago

Patch set 6 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/+/63702

Actions #13

Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63745

Actions #14

Updated by Gerrit Code Review about 4 years ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63745

Actions #15

Updated by Markus Klein about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #16

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed
Actions #17

Updated by Daniel Siepmann over 2 years ago

  • Related to Bug #94710: Database Compare "Change fields" with SQLite shows red error added
Actions #18

Updated by Daniel Siepmann over 2 years ago

  • Related to Bug #94709: TypeError for SQLite in DB Compare added
Actions

Also available in: Atom PDF