Convert UNIQUE keys into PRIMARY KEY
authorReedy <reedy@wikimedia.org>
Fri, 4 Aug 2017 12:43:50 +0000 (14:43 +0200)
committerReedy <reedy@wikimedia.org>
Tue, 29 Aug 2017 17:25:37 +0000 (18:25 +0100)
commit0f13fff1604778397c4ca3072ab80ef113c936ff
tree629eb192ca298046c2a6700099b7d160cbbf59ed
parent6939a99e575276090175f7bcf1fff613af6fd969
Convert UNIQUE keys into PRIMARY KEY

WMF DBAs have been doing a massive effort to convert UNIQUE KEYS into
PRIMARY KEY.

Having a PK is essential to do maintenance, specially on large tasks.
By not having a PK it is impossible to add it in a safe way if not done
directly on the master.

Having a PK means that we can easily change the PK into another one if
needed in the future. The ones we chose might not be the best ones, but
will allow us to get them changed.

Bug: T172514
Change-Id: Id635297838938c7c5dfe65d45285a4d16d65152d
35 files changed:
RELEASE-NOTES-1.30
includes/api/ApiQueryLinks.php
includes/installer/MysqlUpdater.php
includes/installer/SqliteUpdater.php
maintenance/archives/patch-categorylinks-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-imagelinks-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-iwlinks-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-langlinks-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-log_search-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-module_deps-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-objectcache-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-pagelinks-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-querycache_info-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-site_stats-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-templatelinks-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-text-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-transcache-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-user_former_groups-fix-pk.sql [new file with mode: 0644]
maintenance/archives/patch-user_properties-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-categorylinks-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-imagelinks-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-iwlinks-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-langlinks-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-log_search-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-module_deps-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-objectcache-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-pagelinks-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-querycache_info-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-site_stats-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-templatelinks-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-text-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-transcache-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-user_former_groups-fix-pk.sql [new file with mode: 0644]
maintenance/sqlite/archives/patch-user_properties-fix-pk.sql [new file with mode: 0644]
maintenance/tables.sql