Merge lp:~danilo/launchpad/bug-1000642-drop into lp:launchpad/db-devel

Proposed by Данило Шеган on 2012-06-27
Status: Merged
Approved by: Stuart Bishop on 2012-07-03
Approved revision: no longer in the source branch.
Merged at revision: 11732
Proposed branch: lp:~danilo/launchpad/bug-1000642-drop
Merge into: lp:launchpad/db-devel
Diff against target: 98 lines (+9/-38)
4 files modified
database/sampledata/current-dev.sql (+0/-16)
database/sampledata/current.sql (+0/-16)
database/schema/comments.sql (+0/-6)
database/schema/patch-2209-20-1.sql (+9/-0)
To merge this branch: bzr merge lp:~danilo/launchpad/bug-1000642-drop
Reviewer Review Type Date Requested Status
Stuart Bishop db 2012-06-27 Approve on 2012-06-27
Review via email: mp+112306@code.launchpad.net

Commit Message

Drop SpecificationFeedback table.

Description of the Change

= Bug 1000642: drop the table to complete the bug fix =

I need a DB patch number assigned as well.

== LOC Rationale ==

This is part of our effort to implement https://dev.launchpad.net/Projects/WorkItems/ done solely for the LOC credit.

== Tests ==

Full test suite.

== Demo and Q/A ==

Full test suite.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  database/sampledata/current.sql
  database/sampledata/current-dev.sql
  database/schema/patch-2209-20-1.sql
  database/schema/comments.sql

To post a comment you must log in.
Stuart Bishop (stub) wrote :

We are still running Slony and can't use DROP TABLE. Instead, you want to:

ALTER TABLE SpecificationFeedback DROP CONSTRAINT specificationfeedback_specification_fk;
ALTER TABLE SpecificationFeedback SET SCHEMA todrop;

The deployment scripts will then do the dance to remove the table from replication and drop it.

Fine for landing after you replace the DROP TABLE with the above.Patch 2209-20-1

review: Approve (db)
Данило Шеган (danilo) wrote :

Stuart, can you please land this for me (I don't want to approve it myself to land it)?

Stuart Bishop (stub) wrote :

With ec2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/sampledata/current-dev.sql'
2--- database/sampledata/current-dev.sql 2012-06-26 10:19:37 +0000
3+++ database/sampledata/current-dev.sql 2012-06-27 11:32:23 +0000
4@@ -765,9 +765,6 @@
5
6
7
8-
9-
10-
11 SET SESSION AUTHORIZATION DEFAULT;
12
13 ALTER TABLE account DISABLE TRIGGER ALL;
14@@ -9636,19 +9633,6 @@
15 ALTER TABLE specificationdependency ENABLE TRIGGER ALL;
16
17
18-ALTER TABLE specificationfeedback DISABLE TRIGGER ALL;
19-
20-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (1, 3, 13, 16, 'Please make sure this reflects your implementation plan.', '2006-10-16 18:31:52.861885');
21-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (2, 4, 16, 1, 'Please confirm this meets your requirements.', '2006-10-16 18:31:52.864486');
22-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (4, 6, 13, 1, 'sckj hsdkjhskdhdhsdkjf hsdf', '2006-10-16 18:31:52.865147');
23-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (5, 6, 1, 12, 'sfdjgdlfjgdlfjgdf glkdjf gldkfj glkdfj glkdjf', '2006-10-16 18:31:52.865733');
24-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (8, 3, 1, 1, 'foo bar baz xfhds fksd hfskdf slkd fksdhf sdkjhfksdf sdkfjh skdjfhsdkj fskjdhfj.d kjsdhfkjhds fs kjshdfkj.', '2006-10-16 18:31:52.866321');
25-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (9, 3, 1, 12, 'sdfjlksd jflsjdflskjd flksjd fksdjf lskjd flksdfslds lskjflkdss slkd slkfj sljdls kjds flslkdjfls.', '2006-10-16 18:31:52.866953');
26-
27-
28-ALTER TABLE specificationfeedback ENABLE TRIGGER ALL;
29-
30-
31 ALTER TABLE specificationmessage DISABLE TRIGGER ALL;
32
33
34
35=== modified file 'database/sampledata/current.sql'
36--- database/sampledata/current.sql 2012-06-22 06:12:53 +0000
37+++ database/sampledata/current.sql 2012-06-27 11:32:23 +0000
38@@ -765,9 +765,6 @@
39
40
41
42-
43-
44-
45 SET SESSION AUTHORIZATION DEFAULT;
46
47 ALTER TABLE account DISABLE TRIGGER ALL;
48@@ -9553,19 +9550,6 @@
49 ALTER TABLE specificationdependency ENABLE TRIGGER ALL;
50
51
52-ALTER TABLE specificationfeedback DISABLE TRIGGER ALL;
53-
54-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (1, 3, 13, 16, 'Please make sure this reflects your implementation plan.', '2006-10-16 18:31:52.861885');
55-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (2, 4, 16, 1, 'Please confirm this meets your requirements.', '2006-10-16 18:31:52.864486');
56-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (4, 6, 13, 1, 'sckj hsdkjhskdhdhsdkjf hsdf', '2006-10-16 18:31:52.865147');
57-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (5, 6, 1, 12, 'sfdjgdlfjgdlfjgdf glkdjf gldkfj glkdfj glkdjf', '2006-10-16 18:31:52.865733');
58-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (8, 3, 1, 1, 'foo bar baz xfhds fksd hfskdf slkd fksdhf sdkjhfksdf sdkfjh skdjfhsdkj fskjdhfj.d kjsdhfkjhds fs kjshdfkj.', '2006-10-16 18:31:52.866321');
59-INSERT INTO specificationfeedback (id, specification, reviewer, requester, queuemsg, date_created) VALUES (9, 3, 1, 12, 'sdfjlksd jflsjdflskjd flksjd fksdjf lskjd flksdfslds lskjflkdss slkd slkfj sljdls kjds flslkdjfls.', '2006-10-16 18:31:52.866953');
60-
61-
62-ALTER TABLE specificationfeedback ENABLE TRIGGER ALL;
63-
64-
65 ALTER TABLE specificationmessage DISABLE TRIGGER ALL;
66
67
68
69=== modified file 'database/schema/comments.sql'
70--- database/schema/comments.sql 2012-06-15 05:49:38 +0000
71+++ database/schema/comments.sql 2012-06-27 11:32:23 +0000
72@@ -1555,12 +1555,6 @@
73 COMMENT ON CONSTRAINT specification_completion_fully_recorded_chk ON Specification IS 'A constraint that ensures, where we have a date_completed, that we also have a completer. This means that the resolution was fully recorded.';
74 COMMENT ON COLUMN Specification.private IS 'Specification is private.';
75
76--- SpecificationFeedback
77-COMMENT ON TABLE SpecificationFeedback IS 'A table representing a review request of a specification, from one user to another, with an optional message.';
78-COMMENT ON COLUMN SpecificationFeedback.reviewer IS 'The person who has been asked to do the review.';
79-COMMENT ON COLUMN SpecificationFeedback.requester IS 'The person who made the request.';
80-COMMENT ON COLUMN SpecificationFeedback.queuemsg IS 'An optional text message for the reviewer, from the requester.';
81-
82 -- SpecificationBranch
83 COMMENT ON TABLE SpecificationBranch IS 'A branch related to a specification, most likely a branch for implementing the specification. It is possible to have multiple branches for a given specification especially in the situation where the specification requires modifying multiple products.';
84 COMMENT ON COLUMN SpecificationBranch.specification IS 'The specification associated with this branch.';
85
86=== added file 'database/schema/patch-2209-20-1.sql'
87--- database/schema/patch-2209-20-1.sql 1970-01-01 00:00:00 +0000
88+++ database/schema/patch-2209-20-1.sql 2012-06-27 11:32:23 +0000
89@@ -0,0 +1,9 @@
90+-- Copyright 2012 Canonical Ltd. This software is licensed under the
91+-- GNU Affero General Public License version 3 (see the file LICENSE).
92+
93+SET client_min_messages=ERROR;
94+
95+ALTER TABLE SpecificationFeedback DROP CONSTRAINT specificationfeedback_specification_fk;
96+ALTER TABLE SpecificationFeedback SET SCHEMA todrop;
97+
98+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 20, 1);

Subscribers

People subscribed via source and target branches

to status/vote changes: