Bug #67445

ALTER TABLE ADD KEY / DROP KEY unsupported

Added by Morton Jonuschat about 1 month ago. Updated 25 days ago.

Status:Resolved Start date:2015-06-14
Priority:Should have Due date:
Assigned To:Morton Jonuschat % Done:

100%

Category:DBAL Spent time: -
Target version:-
TYPO3 Version:7 Is Regression:No
PHP Version:5.6 Sprint Focus:
Complexity:

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 Core - Feature #67301: Don't suggest database alterations for functionally equiv... Resolved 2015-06-05

Associated revisions

Revision 88f2cf21
Added by Morton Jonuschat 25 days 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 Nägler about 1 month ago

  • Category set to DBAL

#2 Updated by Morton Jonuschat about 1 month ago

  • Assigned To set to Morton Jonuschat

#3 Updated by Morton Jonuschat about 1 month ago

  • Status changed from New to In Progress

#4 Updated by Gerrit Code Review about 1 month 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 about 1 month 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 about 1 month 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 about 1 month 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 25 days 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 25 days 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 25 days 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 25 days ago

  • Status changed from Under Review to In Progress

#12 Updated by Gerrit Code Review 25 days 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 25 days 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 25 days ago

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

Also available in: Atom PDF