AUR web interface

Tasklist

FS#23046 - Fully convert to InnoDB

Attached to Project: AUR web interface
Opened by Dan McGee (toofishes) - Friday, 25 February 2011, 16:51 GMT
Last edited by Lukas Fleischer (lfleischer) - Wednesday, 09 March 2011, 17:12 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Low
Priority Normal
Reported Version 1.8.0
Due in Version 1.8.1
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Convert database to InnoDB. This should probably be a script, containing not only lines like:

ALTER TABLE xxx ENGINE = InnoDB;

But also lines adding FOREIGN KEY constraints to all the tables now that we can actually enforce them. It looks like (most of?) these already exist in the schema but none of them will be there due to former use of MyISAM; simply taking these and converting them to ALTER TABLE statements should do.

Adding the ENGINE statements to the CREATE TABLE in the schema script would also be good.

Noted omissions of foreign keys looking at the schema:
* Sessions.UsersID - needs a foreign key, ON DELETE CASCADE as well (do users ever get deleted?)
* Packages.{Submitter,Maintainer}UID - mark NULL, DEFAULT NULL, ON DELETE SET NULL so foreign key integrity is preserved. There is no user with Id 0.
* PackageDepends - needs two foreign keys, ON DELETE CASCADE
* PackageSources - foreign key + ON DELETE CASCADE
* PackageComments - What is DelUsersID? And default probably needs to be NULL
* TU_VoteInfo, TU_Votes - needs constraints similar to what has been outlined so far
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Wednesday, 09 March 2011, 17:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 1.8.1.
Comment by Lukas Fleischer (lfleischer) - Sunday, 27 February 2011, 18:51 GMT
  • Field changed: Due in Version (Undecided → 1.8.1)
Added omissions of foreign keys to the schema [1].

Defined "PackageComments.DelUsersID" [2], as well as both "Packages.SubmitterUID" and "Packages.MaintainerUID" [3], as "NULL".

Added "ALTER" statements to add missing foreign keys to "UPGRADING" [4].

Added "ENGINE" statements to the "CREATE TABLE" statements in the schema [5].

[1] http://projects.archlinux.org/aur.git/commit/?id=ac632980c3789cd99a80d61861b8820ddad14704
[2] http://projects.archlinux.org/aur.git/commit/?id=40ccf77ca0c6745d8b75e925e915cdf51a924312
[3] http://projects.archlinux.org/aur.git/commit/?id=1e3fa38de5f940fef474fc3961c70b357b976308
[4] http://projects.archlinux.org/aur.git/commit/?id=84c2491e63ef2797084f9378674d3e38248b7c24
[5] http://projects.archlinux.org/aur.git/commit/?id=816a0cf8d7b2365d38699b72322c785b338350f1
Comment by Dan McGee (toofishes) - Sunday, 27 February 2011, 18:54 GMT
On a side note, I enabled InnoDB on sigurd and tweaked the settings so things should be OK to convert whenever you are ready to do so.
Comment by Lukas Fleischer (lfleischer) - Sunday, 27 February 2011, 18:58 GMT
Yeah, already noticed that. Thanks!

Loading...