Last modified: 2014-09-25 14:58:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73198, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71198 - Image and oldimage tables lack auto-incrementing primary keys
Image and oldimage tables lack auto-incrementing primary keys
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.25-git
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nathan Larson
:
Depends on:
Blocks: 15441
  Show dependency treegraph
 
Reported: 2014-09-23 20:55 UTC by Nathan Larson
Modified: 2014-09-25 14:58 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nathan Larson 2014-09-23 20:55:51 UTC
Image and oldimage tables lack primary keys. Therefore, img_id and oi_id should be added. There is a comment in LocalFile::recordUpload2() noting, "# TODO: the image/oldimage tables should be like page/revision with an ID field".
Comment 1 Nathan Larson 2014-09-23 20:59:26 UTC
Oh, I guess image has a primary key (img_name), but it should be an auto-incrementing primary key.
Comment 2 Nathan Larson 2014-09-24 01:17:18 UTC
Aaron, I notice you were the one who added that TODO. What did you have in mind, adding an img_id field and an oi_img_id field? So then, an image entry with img_id 1 that gets moved to the oldimage table (due to an upload of a new version of the file) would then have oi_img_id 1?
Comment 3 Nathan Larson 2014-09-24 17:34:29 UTC
Or did you have in mind a system in which image would be like the page table, which stores no revision data, and only links to the latest revision; and oldimage would be like the revision table, which contains the data about where to find the text? So then oi_img_id would be like rev_page, and there would be an img_latest, rather than having an img_name that stores filenames? Thanks.
Comment 4 Nathan Larson 2014-09-25 14:58:51 UTC
Filed RFC as [[mw:Requests for comment/Image and oldimage tables]]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links