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
16 lines
No EOL
501 B
SQL
16 lines
No EOL
501 B
SQL
CREATE TABLE /*_*/module_deps_tmp (
|
|
-- Module name
|
|
md_module varbinary(255) NOT NULL,
|
|
-- Module context vary (includes skin and language; called "md_skin" for legacy reasons)
|
|
md_skin varbinary(32) NOT NULL,
|
|
-- JSON blob with file dependencies
|
|
md_deps mediumblob NOT NULL,
|
|
PRIMARY KEY (md_module,md_skin)
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
INSERT INTO /*_*/module_deps_tmp
|
|
SELECT * FROM /*_*/module_deps;
|
|
|
|
DROP TABLE /*_*/module_deps;
|
|
|
|
ALTER TABLE /*_*/module_deps_tmp RENAME TO /*_*/module_deps; |