Bug #67445

ALTER TABLE ADD KEY / DROP KEY unsupported

Added by Morton Jonuschat over 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2015-06-14
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Using DBAL it is currently not possible to add or drop indexes. Only a partial/invalid query is generated from the MySQL Statement in the SQL Parser.

Input:

ALTER TABLE pages ADD KEY determineSiteRoot (is_siteroot);

Statement generated by SQL Parser:

 (is_siteroot)

Environment: TYPO3 7.3-dev@master
Database: PostgreSQL 9.4


Related issues

Blocks TYPO3 Core - Feature #67301: Don't suggest database alterations for functionally equivalent field types with DBAL Closed 2015-06-05

Associated revisions

Revision 88f2cf21 (diff)
Added by Morton Jonuschat over 4 years ago

[TASK] dbal: Add support for ALTER TABLE ADD/DROP KEY

Add support for creating and removing indices to DBAL. The SQL is
generated using the respective ADOdb methods, so adding/removing
PRIMARY keys is not possible.

MySQL prefix lengths will be removed from columns in an index
definition unless the DBMS specifically enables support for this
feature. To ensure that index columns get properly quoted by
ADOdb the field names need to be wrapped in backticks.

Due to the common requirement that index names must be unique within a
database/schema the requested index name will be prepended with a
unique table name identifier.

Resolves: #67445
Resolves: #67531
Releases: master
Change-Id: I274be8df3078867309dde0d5771853c67903719d
Reviewed-on: http://review.typo3.org/40397
Reviewed-by: Stephan Großberndt <>
Tested-by: Stephan Großberndt <>
Reviewed-by: Markus Klein <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Frank Naegler over 4 years ago

  • Category set to 999

#2 Updated by Morton Jonuschat over 4 years ago

  • Assignee set to Morton Jonuschat

#3 Updated by Morton Jonuschat over 4 years ago

  • Status changed from New to In Progress

#4 Updated by Gerrit Code Review over 4 years ago

  • Status changed from In Progress 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 http://review.typo3.org/40397

#5 Updated by Gerrit Code Review over 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 http://review.typo3.org/40397

#6 Updated by Gerrit Code Review over 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 http://review.typo3.org/40397

#7 Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#8 Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#9 Updated by Gerrit Code Review over 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 http://review.typo3.org/40397

#10 Updated by Gerrit Code Review over 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#11 Updated by Stephan Großberndt over 4 years ago

  • Status changed from Under Review to In Progress

#12 Updated by Gerrit Code Review over 4 years ago

  • Status changed from In Progress to Under Review

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#13 Updated by Gerrit Code Review over 4 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40397

#14 Updated by Morton Jonuschat over 4 years ago

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

#15 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF