summaryrefslogtreecommitdiffstats
path: root/upgrading/1.8.1.txt
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-06-29 23:09:35 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-06-29 23:10:45 +0200
commit1fe14899aa808f50144162d6b14fc583873d08fc (patch)
tree9febba2c1876be4cd8f76c08e5a65b8697ddeee6 /upgrading/1.8.1.txt
parent5e49aca247a27dc0334e999dfb306e27ddbe99b9 (diff)
downloadaur-1fe14899aa808f50144162d6b14fc583873d08fc.tar.gz
aur-1fe14899aa808f50144162d6b14fc583873d08fc.tar.xz
Split UPGRADING
Split the upgrade instructions into several files, one file per version in order to keep them small, readable and to avoid merge conflicts. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'upgrading/1.8.1.txt')
-rw-r--r--upgrading/1.8.1.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/upgrading/1.8.1.txt b/upgrading/1.8.1.txt
new file mode 100644
index 00000000..48c2119d
--- /dev/null
+++ b/upgrading/1.8.1.txt
@@ -0,0 +1,56 @@
+1. Drop foreign keys from the "Sessions" table:
+
+`ALTER TABLE Sessions DROP FOREIGN KEY Sessions_ibfk_1;` should work in most
+cases. Otherwise, check the output of `SHOW CREATE TABLE Sessions;` and use the
+foreign key name shown there.
+
+2. Run the following MySQL statements:
+
+----
+ALTER TABLE Sessions
+ ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE;
+ALTER TABLE PackageDepends
+ ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,
+ ADD FOREIGN KEY (DepPkgID) REFERENCES Packages(ID) ON DELETE CASCADE;
+ALTER TABLE PackageSources
+ ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
+ALTER TABLE TU_VoteInfo
+ ADD FOREIGN KEY (SubmitterID) REFERENCES Users(ID) ON DELETE CASCADE;
+ALTER TABLE TU_Votes
+ ADD FOREIGN KEY (VoteID) REFERENCES TU_VoteInfo(ID) ON DELETE CASCADE,
+ ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
+ALTER TABLE PackageComments
+ MODIFY DelUsersID INTEGER UNSIGNED NULL DEFAULT NULL;
+UPDATE PackageComments SET DelUsersID = NULL WHERE DelUsersID = 0;
+ALTER TABLE Packages
+ MODIFY SubmitterUID INTEGER UNSIGNED NULL DEFAULT NULL,
+ MODIFY MaintainerUID INTEGER UNSIGNED NULL DEFAULT NULL;
+UPDATE Packages SET SubmitterUID = NULL WHERE SubmitterUID = 0;
+UPDATE Packages SET MaintainerUID = NULL WHERE MaintainerUID = 0;
+----
+
+3. (optional) If you converted your database from MyISAM to InnoDB during the
+upgrade process from 1.7.0 to 1.8.0 or from 1.8.0 to 1.8.1 without completely
+rebuilding the database from the MySQL schema, you should additionally run the
+following MySQL statements to add missing foreign keys:
+
+----
+ALTER TABLE Users
+ ADD FOREIGN KEY (AccountTypeID) REFERENCES AccountTypes(ID) ON DELETE NO ACTION;
+ALTER TABLE Packages
+ ADD FOREIGN KEY (CategoryID) REFERENCES PackageCategories(ID) ON DELETE NO ACTION,
+ ADD FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE NO ACTION,
+ ADD FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE NO ACTION;
+ALTER TABLE PackageVotes
+ ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
+ ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
+ALTER TABLE PackageComments
+ ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
+ ADD FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE,
+ ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
+ALTER TABLE CommentNotify
+ ADD FOREIGN KEY (PkgID) REFERENCES Packages(ID) ON DELETE CASCADE,
+ ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
+----
+
+4. Merge "web/lib/config.inc.proto" with "web/lib/config.inc".