CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Task #39003

Add dummy field to some System tables

Added by Fabien Udriot 10 months ago. Updated 9 months ago.

Status:Resolved Start date:2012-07-16
Priority:Should have Due date:
Assignee:Fabien Udriot % Done:

100%

Category:-
Target version:3.6.11
PHP Version:
Votes: 0

Description

TYPO3 6.0 introduces new system table (sys_file*, sys_category*) which should have the is_dummy_record field in standard.


Related issues

blocks Extbase MVC Framework - Task #36648: Update unit tests to latest phpunit support Resolved 2012-04-27
blocks Core - Task #38952: Add Unit Test for Static File Collection Under Review 2012-07-14

Associated revisions

Revision d17c1373
Added by Fabien Udriot 9 months ago

[TASK] Add dummy field to some System tables

TYPO3 6.0 introduces new system tables (sys_file*, sys_category*, ...)
which should have the tx_phpunit_is_dummy_record field by default.

Change-Id: I623095f8e234740d522b2b69a0a37feba4bbc3f6
Resolves: #39003

History

Updated by Gerrit Code Review 10 months ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Fabien Udriot 10 months ago

I am unsure though, whether we should add a TYPO3 minimum version... Probably not, it doesn't hurt to have a few (sys_) empty tables for T3 version < 6.0, IMO

Updated by Gerrit Code Review 10 months ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Oliver Klee 10 months ago

  • Status changed from New to Accepted
  • Assignee set to Fabien Udriot
  • Target version set to 3.6.11

Updated by Oliver Klee 10 months ago

  • Status changed from Accepted to Under Review

Updated by Gerrit Code Review 10 months ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Fabien Udriot 10 months ago

1. rename the new columns to "tx_phpunit_is_dummy_record"

Done

2. add unit tests that these system tables can be created by the framework (you'll need to add them to Tx_Phpunit_Framework.allowedSystemTables) - you can copy'n'paste from the unit tests for the other system tables

Done. Hope I did the "copy'n'paste" correctly. On the top of that, I updated the Test Case from Gerrit patch 12789 . I can confirm it is working as expected with this patch apply in ext:phpunit. :) There is another Test Case somewhere in the Gerrit queue that I will change once this one is approved.

3. Please test that it works to first create the new tables via the EM in phpunit, and then update to 6.0. I remember that this might post a problem when creating the uid column, but haven't verified this yet.

You were right! It seems there is an issue if the tx_phpunit_is_dummy_record field is created before the upgrade (sys_file_* being created without the uid at first). Actually, I had to run the update twice in the install tool to achieve a proper table definition. As said, at the second run the issue disappeared.

Message from the install tool after the first update (problem is with the auto_increment which is not set correctly at first because of an already existing field?)

ALTER TABLE sys_file CHANGE uid uid int(11) auto_increment;
Current value: int(11) default NULL

Updated by Oliver Klee 10 months ago

You were right! It seems there is an issue if the tx_phpunit_is_dummy_record field is created before the upgrade (sys_file_* being created without the uid at first). Actually, I had to run the update twice in the install tool to achieve a proper table definition. As said, at the second run the issue disappeared.

Then this is okay IMHO.

Updated by Fabien Udriot 10 months ago

I would say that too (since affecting mainly development instances)

Updated by Gerrit Code Review 10 months ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Gerrit Code Review 9 months ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Gerrit Code Review 9 months ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Gerrit Code Review 9 months ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12830

Updated by Fabien Udriot 9 months ago

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

Also available in: Atom PDF