Merge ~ilasc/launchpad:db-close-account-job-object into launchpad:db-devel

Proposed by Ioana Lasc
Status: Rejected
Rejected by: Ioana Lasc
Proposed branch: ~ilasc/launchpad:db-close-account-job-object
Merge into: launchpad:db-devel
Diff against target: 20 lines (+14/-0)
1 file modified
database/schema/patch-2210-29-0.sql (+14/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Needs Information
Review via email: mp+400259@code.launchpad.net

Commit message

Create CloseAccountJobObject for close account celery job

To post a comment you must log in.
9774eef... by Ioana Lasc

Fix indentation for the exception field

Revision history for this message
Colin Watson (cjwatson) wrote :

A new table for this is quite heavyweight, so it would be good to see if it can be easily avoided. Did you consider instead making this a subtype of `PersonTransferJob`, by adding another entry to `PersonTransferJobType` and adding another subclass of `PersonTransferJobDerived`? It seems that the work that closing accounts does isn't so far removed from some of the other tasks performed by person transfer jobs, so it might make sense to group them together.

review: Needs Information
Revision history for this message
Ioana Lasc (ilasc) wrote :

Totally agreed on the re-usability of PersonTransferJob Colin, thanks for pointing that out.

Changes were made by adding a new type of PersonTransferJobType on the code branch only (MP 400261 will be updated to reflect that).

Marking this as rejected since this will not require and entire table added via sql patch.

Unmerged commits

9774eef... by Ioana Lasc

Fix indentation for the exception field

400fa26... by Ioana Lasc

Create CloseAccountJobObject for close account celery job

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-29-0.sql b/database/schema/patch-2210-29-0.sql
2new file mode 100644
3index 0000000..941ff5f
4--- /dev/null
5+++ b/database/schema/patch-2210-29-0.sql
6@@ -0,0 +1,14 @@
7+SET client_min_messages=ERROR;
8+
9+CREATE TABLE CloseAccountJobObject (
10+ id SERIAL PRIMARY KEY,
11+ job INTEGER NOT NULL UNIQUE REFERENCES Job(id),
12+ job_type INTEGER NOT NULL,
13+ date_created timestamp without time zone,
14+ date_finished timestamp without time zone,
15+ status INTEGER,
16+ exception TEXT,
17+ username TEXT NOT NULL
18+);
19+
20+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 29, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: