← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/db-cleanup-2016 into lp:launchpad/db-devel

 

William Grant has proposed merging lp:~wgrant/launchpad/db-cleanup-2016 into lp:launchpad/db-devel.

Commit message:
Clean up old DB tables, views, and functions.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/db-cleanup-2016/+merge/307684

Clean up old DB tables, views, and functions.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/db-cleanup-2016 into lp:launchpad/db-devel.
=== modified file 'database/sampledata/current-dev.sql'
--- database/sampledata/current-dev.sql	2016-09-07 22:29:27 +0000
+++ database/sampledata/current-dev.sql	2016-10-05 10:10:09 +0000
@@ -1,6 +1,6 @@
 -- Copyright 2010-2016 Canonical Ltd.  This software is licensed under the
 -- GNU Affero General Public License version 3 (see the file LICENSE).
--- Created using pg_dump (PostgreSQL) 9.3.12
+-- Created using pg_dump (PostgreSQL) 9.3.5
 
 SET check_function_bodies = false;
 SET client_encoding = 'UTF8';
@@ -2670,35 +2670,6 @@
 
 
 
-ALTER TABLE cve DISABLE TRIGGER ALL;
-
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (1, '1999-8979', 2, 'Firefox crashes all the time', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.508959', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (2, '1999-2345', 1, 'Possible data loss', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.513099', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (3, '2005-2730', 1, 'The HTTP proxy in Astaro Security Linux 6.0 allows remote attackers to obtain sensitive information via an invalid request, which reveals a Proxy-authorization string in an error message.', '2005-09-13 14:05:15.669384', '2005-09-13 14:05:15.669384', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (4, '2005-2731', 1, 'Directory traversal vulnerability in Astaro Security Linux 6.0, when using Webmin, allows remote authenticated webmin users to read arbitrary files via a ..  (dot dot) in the wfe_download parameter to index.fpl.', '2005-09-13 14:05:15.91729', '2005-09-13 14:05:15.91729', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (5, '2005-2732', 1, 'AWStats 6.4, and possibly earlier versions, allows remote attackers to obtain sensitive information via a file that does not exist in the config parameter, which reveals the path in an error message.', '2005-09-13 14:05:15.992007', '2005-09-13 14:05:15.992007', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (6, '2005-2733', 1, 'upload_img_cgi.php in Simple PHP Blog (SPHPBlog) does not properly restrict file extensions of uploaded files, which could allow remote attackers to execute arbitrary code.', '2005-09-13 14:05:16.072418', '2005-09-13 14:05:16.072418', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (7, '2005-2734', 1, 'Cross-site scripting (XSS) vulnerability in Gallery 1.5.1-RC2 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.202393', '2005-09-13 14:05:16.202393', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (8, '2005-2735', 1, 'Cross-site scripting (XSS) vulnerability in phpGraphy 0.9.9a and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.412226', '2005-09-13 14:05:16.412226', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (9, '2005-2736', 1, 'Cross-site scripting (XSS) vulnerability in YaPig 0.95 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.841572', '2005-09-13 14:05:16.841572', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (10, '2005-2737', 1, 'Cross-site scripting (XSS) vulnerability in PhotoPost PHP Pro 5.1 allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:17.043865', '2005-09-13 14:05:17.043865', NULL);
-
-
-ALTER TABLE cve ENABLE TRIGGER ALL;
-
-
-ALTER TABLE bugcve DISABLE TRIGGER ALL;
-
-INSERT INTO bugcve (id, bug, cve, date_created) VALUES (1, 1, 1, '2006-10-16 18:31:43.127783');
-INSERT INTO bugcve (id, bug, cve, date_created) VALUES (2, 2, 2, '2006-10-16 18:31:43.128996');
-
-
-ALTER TABLE bugcve ENABLE TRIGGER ALL;
-
-
-
-
-
 ALTER TABLE bugwatch DISABLE TRIGGER ALL;
 
 INSERT INTO bugwatch (id, bug, bugtracker, remotebug, remotestatus, lastchanged, lastchecked, datecreated, owner, last_error_type, remote_importance, remote_lp_bug_id, next_check) VALUES (1, 2, 1, '42', 'FUBAR', '2004-09-24 20:58:04.740841', '2004-09-24 20:58:04.740841', '2004-09-24 20:58:04.740841', 12, NULL, 'BAZBAZ', NULL, NULL);
@@ -3183,8 +3154,8 @@
 
 ALTER TABLE codeimport DISABLE TRIGGER ALL;
 
-INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url) VALUES (1, 75, '2007-06-25 20:04:04.226605', 52, 2, NULL, NULL, 20, NULL, 52, NULL, NULL, 'http://svn.example.org/svnroot/gnome-terminal/trunk');
-INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url) VALUES (2, 76, '2007-06-25 20:04:04.379285', 52, 1, ':pserver:anonymous@xxxxxxxxxxxxxxxxxxx:/cvs/gnome', 'evolution', 1, NULL, 52, NULL, NULL, NULL);
+INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url, git_repository) VALUES (1, 75, '2007-06-25 20:04:04.226605', 52, 2, NULL, NULL, 20, NULL, 52, NULL, NULL, 'http://svn.example.org/svnroot/gnome-terminal/trunk', NULL);
+INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url, git_repository) VALUES (2, 76, '2007-06-25 20:04:04.379285', 52, 1, ':pserver:anonymous@xxxxxxxxxxxxxxxxxxx:/cvs/gnome', 'evolution', 1, NULL, 52, NULL, NULL, NULL, NULL);
 
 
 ALTER TABLE codeimport ENABLE TRIGGER ALL;
@@ -3348,6 +3319,23 @@
 
 
 
+ALTER TABLE cve DISABLE TRIGGER ALL;
+
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (1, '1999-8979', 2, 'Firefox crashes all the time', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.508959', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (2, '1999-2345', 1, 'Possible data loss', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.513099', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (3, '2005-2730', 1, 'The HTTP proxy in Astaro Security Linux 6.0 allows remote attackers to obtain sensitive information via an invalid request, which reveals a Proxy-authorization string in an error message.', '2005-09-13 14:05:15.669384', '2005-09-13 14:05:15.669384', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (4, '2005-2731', 1, 'Directory traversal vulnerability in Astaro Security Linux 6.0, when using Webmin, allows remote authenticated webmin users to read arbitrary files via a ..  (dot dot) in the wfe_download parameter to index.fpl.', '2005-09-13 14:05:15.91729', '2005-09-13 14:05:15.91729', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (5, '2005-2732', 1, 'AWStats 6.4, and possibly earlier versions, allows remote attackers to obtain sensitive information via a file that does not exist in the config parameter, which reveals the path in an error message.', '2005-09-13 14:05:15.992007', '2005-09-13 14:05:15.992007', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (6, '2005-2733', 1, 'upload_img_cgi.php in Simple PHP Blog (SPHPBlog) does not properly restrict file extensions of uploaded files, which could allow remote attackers to execute arbitrary code.', '2005-09-13 14:05:16.072418', '2005-09-13 14:05:16.072418', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (7, '2005-2734', 1, 'Cross-site scripting (XSS) vulnerability in Gallery 1.5.1-RC2 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.202393', '2005-09-13 14:05:16.202393', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (8, '2005-2735', 1, 'Cross-site scripting (XSS) vulnerability in phpGraphy 0.9.9a and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.412226', '2005-09-13 14:05:16.412226', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (9, '2005-2736', 1, 'Cross-site scripting (XSS) vulnerability in YaPig 0.95 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.841572', '2005-09-13 14:05:16.841572', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (10, '2005-2737', 1, 'Cross-site scripting (XSS) vulnerability in PhotoPost PHP Pro 5.1 allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:17.043865', '2005-09-13 14:05:17.043865', NULL);
+
+
+ALTER TABLE cve ENABLE TRIGGER ALL;
+
+
 
 
 
@@ -9250,16 +9238,6 @@
 
 
 
-ALTER TABLE questionbug DISABLE TRIGGER ALL;
-
-
-
-ALTER TABLE questionbug ENABLE TRIGGER ALL;
-
-
-
-
-
 ALTER TABLE questionjob DISABLE TRIGGER ALL;
 
 
@@ -9540,6 +9518,13 @@
 
 
 
+ALTER TABLE snapbuildjob DISABLE TRIGGER ALL;
+
+
+
+ALTER TABLE snapbuildjob ENABLE TRIGGER ALL;
+
+
 ALTER TABLE snapfile DISABLE TRIGGER ALL;
 
 
@@ -9669,17 +9654,6 @@
 
 
 
-ALTER TABLE specificationbug DISABLE TRIGGER ALL;
-
-INSERT INTO specificationbug (id, specification, bug) VALUES (1, 3, 1);
-
-
-ALTER TABLE specificationbug ENABLE TRIGGER ALL;
-
-
-
-
-
 ALTER TABLE specificationdependency DISABLE TRIGGER ALL;
 
 INSERT INTO specificationdependency (id, specification, dependency, date_created) VALUES (1, 4, 3, '2006-10-16 18:31:52.855436');

=== modified file 'database/sampledata/current.sql'
--- database/sampledata/current.sql	2016-09-07 22:29:27 +0000
+++ database/sampledata/current.sql	2016-10-05 10:10:09 +0000
@@ -2602,35 +2602,6 @@
 
 
 
-ALTER TABLE cve DISABLE TRIGGER ALL;
-
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (1, '1999-8979', 2, 'Firefox crashes all the time', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.508959', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (2, '1999-2345', 1, 'Possible data loss', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.513099', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (3, '2005-2730', 1, 'The HTTP proxy in Astaro Security Linux 6.0 allows remote attackers to obtain sensitive information via an invalid request, which reveals a Proxy-authorization string in an error message.', '2005-09-13 14:05:15.669384', '2005-09-13 14:05:15.669384', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (4, '2005-2731', 1, 'Directory traversal vulnerability in Astaro Security Linux 6.0, when using Webmin, allows remote authenticated webmin users to read arbitrary files via a ..  (dot dot) in the wfe_download parameter to index.fpl.', '2005-09-13 14:05:15.91729', '2005-09-13 14:05:15.91729', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (5, '2005-2732', 1, 'AWStats 6.4, and possibly earlier versions, allows remote attackers to obtain sensitive information via a file that does not exist in the config parameter, which reveals the path in an error message.', '2005-09-13 14:05:15.992007', '2005-09-13 14:05:15.992007', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (6, '2005-2733', 1, 'upload_img_cgi.php in Simple PHP Blog (SPHPBlog) does not properly restrict file extensions of uploaded files, which could allow remote attackers to execute arbitrary code.', '2005-09-13 14:05:16.072418', '2005-09-13 14:05:16.072418', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (7, '2005-2734', 1, 'Cross-site scripting (XSS) vulnerability in Gallery 1.5.1-RC2 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.202393', '2005-09-13 14:05:16.202393', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (8, '2005-2735', 1, 'Cross-site scripting (XSS) vulnerability in phpGraphy 0.9.9a and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.412226', '2005-09-13 14:05:16.412226', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (9, '2005-2736', 1, 'Cross-site scripting (XSS) vulnerability in YaPig 0.95 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.841572', '2005-09-13 14:05:16.841572', NULL);
-INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (10, '2005-2737', 1, 'Cross-site scripting (XSS) vulnerability in PhotoPost PHP Pro 5.1 allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:17.043865', '2005-09-13 14:05:17.043865', NULL);
-
-
-ALTER TABLE cve ENABLE TRIGGER ALL;
-
-
-ALTER TABLE bugcve DISABLE TRIGGER ALL;
-
-INSERT INTO bugcve (id, bug, cve, date_created) VALUES (1, 1, 1, '2006-10-16 18:31:43.127783');
-INSERT INTO bugcve (id, bug, cve, date_created) VALUES (2, 2, 2, '2006-10-16 18:31:43.128996');
-
-
-ALTER TABLE bugcve ENABLE TRIGGER ALL;
-
-
-
-
-
 ALTER TABLE bugwatch DISABLE TRIGGER ALL;
 
 INSERT INTO bugwatch (id, bug, bugtracker, remotebug, remotestatus, lastchanged, lastchecked, datecreated, owner, last_error_type, remote_importance, remote_lp_bug_id, next_check) VALUES (1, 2, 1, '42', 'FUBAR', '2004-09-24 20:58:04.740841', '2004-09-24 20:58:04.740841', '2004-09-24 20:58:04.740841', 12, NULL, 'BAZBAZ', NULL, NULL);
@@ -3115,8 +3086,8 @@
 
 ALTER TABLE codeimport DISABLE TRIGGER ALL;
 
-INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url) VALUES (1, 75, '2007-06-25 20:04:04.226605', 52, 2, NULL, NULL, 20, NULL, 52, NULL, NULL, 'http://svn.example.org/svnroot/gnome-terminal/trunk');
-INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url) VALUES (2, 76, '2007-06-25 20:04:04.379285', 52, 1, ':pserver:anonymous@xxxxxxxxxxxxxxxxxxx:/cvs/gnome', 'evolution', 1, NULL, 52, NULL, NULL, NULL);
+INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url, git_repository) VALUES (1, 75, '2007-06-25 20:04:04.226605', 52, 2, NULL, NULL, 20, NULL, 52, NULL, NULL, 'http://svn.example.org/svnroot/gnome-terminal/trunk', NULL);
+INSERT INTO codeimport (id, branch, date_created, registrant, rcs_type, cvs_root, cvs_module, review_status, date_last_successful, owner, assignee, update_interval, url, git_repository) VALUES (2, 76, '2007-06-25 20:04:04.379285', 52, 1, ':pserver:anonymous@xxxxxxxxxxxxxxxxxxx:/cvs/gnome', 'evolution', 1, NULL, 52, NULL, NULL, NULL, NULL);
 
 
 ALTER TABLE codeimport ENABLE TRIGGER ALL;
@@ -3285,6 +3256,23 @@
 
 
 
+ALTER TABLE cve DISABLE TRIGGER ALL;
+
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (1, '1999-8979', 2, 'Firefox crashes all the time', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.508959', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (2, '1999-2345', 1, 'Possible data loss', '2005-09-07 19:00:32.944561', '2005-09-13 14:00:03.513099', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (3, '2005-2730', 1, 'The HTTP proxy in Astaro Security Linux 6.0 allows remote attackers to obtain sensitive information via an invalid request, which reveals a Proxy-authorization string in an error message.', '2005-09-13 14:05:15.669384', '2005-09-13 14:05:15.669384', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (4, '2005-2731', 1, 'Directory traversal vulnerability in Astaro Security Linux 6.0, when using Webmin, allows remote authenticated webmin users to read arbitrary files via a ..  (dot dot) in the wfe_download parameter to index.fpl.', '2005-09-13 14:05:15.91729', '2005-09-13 14:05:15.91729', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (5, '2005-2732', 1, 'AWStats 6.4, and possibly earlier versions, allows remote attackers to obtain sensitive information via a file that does not exist in the config parameter, which reveals the path in an error message.', '2005-09-13 14:05:15.992007', '2005-09-13 14:05:15.992007', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (6, '2005-2733', 1, 'upload_img_cgi.php in Simple PHP Blog (SPHPBlog) does not properly restrict file extensions of uploaded files, which could allow remote attackers to execute arbitrary code.', '2005-09-13 14:05:16.072418', '2005-09-13 14:05:16.072418', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (7, '2005-2734', 1, 'Cross-site scripting (XSS) vulnerability in Gallery 1.5.1-RC2 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.202393', '2005-09-13 14:05:16.202393', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (8, '2005-2735', 1, 'Cross-site scripting (XSS) vulnerability in phpGraphy 0.9.9a and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.412226', '2005-09-13 14:05:16.412226', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (9, '2005-2736', 1, 'Cross-site scripting (XSS) vulnerability in YaPig 0.95 and earlier allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:16.841572', '2005-09-13 14:05:16.841572', NULL);
+INSERT INTO cve (id, sequence, status, description, datecreated, datemodified, fti) VALUES (10, '2005-2737', 1, 'Cross-site scripting (XSS) vulnerability in PhotoPost PHP Pro 5.1 allows remote attackers to inject arbitrary web script or HTML via EXIF data, such as the Camera Model Tag.', '2005-09-13 14:05:17.043865', '2005-09-13 14:05:17.043865', NULL);
+
+
+ALTER TABLE cve ENABLE TRIGGER ALL;
+
+
 
 
 
@@ -9162,16 +9150,6 @@
 
 
 
-ALTER TABLE questionbug DISABLE TRIGGER ALL;
-
-
-
-ALTER TABLE questionbug ENABLE TRIGGER ALL;
-
-
-
-
-
 ALTER TABLE questionjob DISABLE TRIGGER ALL;
 
 
@@ -9452,6 +9430,13 @@
 
 
 
+ALTER TABLE snapbuildjob DISABLE TRIGGER ALL;
+
+
+
+ALTER TABLE snapbuildjob ENABLE TRIGGER ALL;
+
+
 ALTER TABLE snapfile DISABLE TRIGGER ALL;
 
 
@@ -9581,17 +9566,6 @@
 
 
 
-ALTER TABLE specificationbug DISABLE TRIGGER ALL;
-
-INSERT INTO specificationbug (id, specification, bug) VALUES (1, 3, 1);
-
-
-ALTER TABLE specificationbug ENABLE TRIGGER ALL;
-
-
-
-
-
 ALTER TABLE specificationdependency DISABLE TRIGGER ALL;
 
 INSERT INTO specificationdependency (id, specification, dependency, date_created) VALUES (1, 4, 3, '2006-10-16 18:31:52.855436');

=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql	2016-07-07 19:15:37 +0000
+++ database/schema/comments.sql	2016-10-05 10:10:09 +0000
@@ -367,10 +367,6 @@
 COMMENT ON COLUMN BugTrackerComponentGroup.name IS 'The product or category name used in the remote bug tracker for grouping components.';
 COMMENT ON COLUMN BugTrackerComponentGroup.bug_tracker IS 'The external bug tracker this component group belongs to.';
 
--- BugCve
-
-COMMENT ON TABLE BugCve IS 'A table that records the link between a given malone bug number, and a CVE entry.';
-
 
 -- BugWatch
 
@@ -1008,10 +1004,6 @@
 COMMENT ON COLUMN Question.whiteboard IS 'A general status whiteboard. This is a scratch space to which arbitrary data can be added (there is only one constant whiteboard with no history). It is displayed at the top of the question. So its a useful way for projects to add their own semantics or metadata to the Answer Tracker.';
 COMMENT ON COLUMN Question.faq IS 'The FAQ document that contains the long answer to this question.';
 
--- QuestionBug
-
-COMMENT ON TABLE QuestionBug IS 'A link between a question and a bug, showing that the bug is somehow related to this question.';
-
 -- QuestionMessage
 
 COMMENT ON TABLE QuestionMessage IS 'A link between a question and a message. This means that the message will be displayed on the question page.';
@@ -1337,10 +1329,6 @@
 COMMENT ON COLUMN MessageChunk.blob IS 'Binary content for this chunk of the message.';
 COMMENT ON COLUMN MessageChunk.sequence IS 'Order of a particular chunk. Chunks are orders in ascending order starting from 1.';
 
--- Comments on Lucille views
-COMMENT ON VIEW SourcePackageFilePublishing IS 'This view is used mostly by Lucille while performing publishing and unpublishing operations. It lists all the files associated with a sourcepackagerelease and collates all the textual representations needed for publishing components etc to allow rapid queries from SQLObject.';
-COMMENT ON VIEW BinaryPackageFilePublishing IS 'This view is used mostly by Lucille while performing publishing and unpublishing operations. It lists all the files associated with a binarypackage and collates all the textual representations needed for publishing components etc to allow rapid queries from SQLObject.';
-
 -- SourcePackageRelease
 
 COMMENT ON TABLE SourcePackageRelease IS 'SourcePackageRelease: A source
@@ -1498,9 +1486,6 @@
 COMMENT ON COLUMN SpecificationBranch.branch IS 'The branch associated to the specification.';
 COMMENT ON COLUMN SpecificationBranch.registrant IS 'The person who linked the specification to the branch.';
 
--- SpecificationBug
-COMMENT ON TABLE SpecificationBug IS 'A table linking a specification and a bug. This is used to provide for easy navigation from bugs to related specs, and vice versa.';
-
 -- SpecificationSubscription
 COMMENT ON TABLE SpecificationSubscription IS 'A table capturing a subscription of a person to a specification.';
 COMMENT ON COLUMN SpecificationSubscription.essential IS 'A field that indicates whether or not this person is essential to discussions on the planned feature. This is used by the meeting scheduler to ensure that all the essential people are at any automatically scheduled BOFs discussing that spec.';

=== added file 'database/schema/patch-2209-77-3.sql'
--- database/schema/patch-2209-77-3.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-77-3.sql	2016-10-05 10:10:09 +0000
@@ -0,0 +1,27 @@
+-- Copyright 2016 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+DROP FUNCTION generate_openid_identifier();
+DROP FUNCTION set_openid_identifier();
+DROP FUNCTION set_shipit_normalized_address();
+DROP FUNCTION is_printable_ascii(text);
+
+-- Unused since r5499.
+DROP FUNCTION is_team(integer);
+DROP FUNCTION is_team(text);
+
+-- Unused since r9019.
+DROP VIEW potexport;
+
+-- Unused since r18209.
+DROP VIEW binarypackagefilepublishing;
+DROP VIEW sourcepackagefilepublishing;
+
+-- Unused since r17805.
+DROP TABLE bugcve;
+DROP TABLE questionbug;
+DROP TABLE specificationbug;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 77, 3);

=== modified file 'database/schema/security.cfg'
--- database/schema/security.cfg	2016-10-02 00:33:51 +0000
+++ database/schema/security.cfg	2016-10-05 10:10:09 +0000
@@ -45,14 +45,10 @@
 public.fticache                            =
 public.ftq(text)                           = EXECUTE
 public._ftq(text)                          = EXECUTE
-public.generate_openid_identifier()        = EXECUTE
 public.getlocalnodeid()                    = EXECUTE
 public.gitrepository_denorm_access(integer)            = EXECUTE
 public.is_blacklisted_name(text, integer)  = EXECUTE
 public.is_person(text)                     = EXECUTE
-public.is_printable_ascii(text)            = EXECUTE
-public.is_team(integer)                    = EXECUTE
-public.is_team(text)                       = EXECUTE
 public.latestdatabasediskutilization       =
 public.launchpaddatabaserevision           = SELECT
 public.launchpaddatabaseupdatelog          = SELECT
@@ -268,7 +264,6 @@
 public.pofiletranslator                 = SELECT
 public.poll                             = SELECT, INSERT, UPDATE
 public.polloption                       = SELECT, INSERT, UPDATE, DELETE
-public.potexport                        = SELECT
 public.previewdiff                      = SELECT, INSERT, UPDATE, DELETE
 public.processacceptedbugsjob           = SELECT, INSERT, UPDATE, DELETE
 public.productjob                       = SELECT, INSERT, UPDATE, DELETE
@@ -545,7 +540,6 @@
 public.pofiletranslator                 = SELECT
 public.pomsgid                          = SELECT
 public.potemplate                       = SELECT
-public.potexport                        = SELECT
 public.potmsgset                        = SELECT
 public.potranslation                    = SELECT
 public.product                          = SELECT
@@ -573,7 +567,6 @@
 public.pofiletranslator                 = SELECT
 public.pomsgid                          = SELECT
 public.potemplate                       = SELECT
-public.potexport                        = SELECT
 public.potmsgset                        = SELECT
 public.potranslation                    = SELECT
 public.product                          = SELECT
@@ -1195,7 +1188,6 @@
 public.archivejob                       = SELECT, INSERT
 public.binarypackagebuild               = SELECT, INSERT, UPDATE
 public.binarypackagefile                = SELECT, INSERT, UPDATE
-public.binarypackagefilepublishing      = SELECT, INSERT, UPDATE
 public.binarypackagename                = SELECT, INSERT, UPDATE
 public.binarypackagepublishinghistory   = SELECT, INSERT, UPDATE, DELETE
 public.binarypackagerelease             = SELECT, INSERT, UPDATE
@@ -1270,7 +1262,6 @@
 public.section                          = SELECT, INSERT, UPDATE
 public.sectionselection                 = SELECT, INSERT, UPDATE
 public.signedcodeofconduct              = SELECT, INSERT, UPDATE
-public.sourcepackagefilepublishing      = SELECT, INSERT, UPDATE
 public.sourcepackageformatselection     = SELECT, INSERT
 public.sourcepackagename                = SELECT, INSERT, UPDATE
 public.sourcepackagepublishinghistory   = SELECT, INSERT, UPDATE
@@ -1366,7 +1357,6 @@
 public.archivepermission                = SELECT
 public.binarypackagebuild               = SELECT, INSERT, UPDATE
 public.binarypackagefile                = SELECT, INSERT
-public.binarypackagefilepublishing      = SELECT
 public.binarypackagename                = SELECT, INSERT
 public.binarypackagepublishinghistory   = SELECT
 public.binarypackagerelease             = SELECT, INSERT
@@ -1453,7 +1443,6 @@
 public.snapbuildjob                     = SELECT, INSERT, UPDATE
 public.snapfile                         = SELECT, INSERT, UPDATE
 public.snappyseries                     = SELECT
-public.sourcepackagefilepublishing      = SELECT
 public.sourcepackageformatselection     = SELECT
 public.sourcepackagename                = SELECT, INSERT
 public.sourcepackagepublishinghistory   = SELECT, INSERT
@@ -1484,7 +1473,6 @@
 public.archivepermission                = SELECT
 public.binarypackagebuild               = SELECT, INSERT, UPDATE
 public.binarypackagefile                = SELECT, UPDATE
-public.binarypackagefilepublishing      = SELECT
 public.binarypackagename                = SELECT
 public.binarypackagepublishinghistory   = SELECT, INSERT, UPDATE
 public.binarypackagerelease             = SELECT, UPDATE
@@ -1568,7 +1556,6 @@
 public.sharingjob                       = SELECT, INSERT, UPDATE
 public.snapbuild                        = SELECT
 public.snapfile                         = SELECT, UPDATE
-public.sourcepackagefilepublishing      = SELECT
 public.sourcepackagename                = SELECT
 public.sourcepackagepublishinghistory   = SELECT, INSERT, UPDATE
 public.sourcepackagerecipebuild         = SELECT