← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~danilo/launchpad/bug-814580-cold-db into lp:launchpad

 

Данило Шеган has proposed merging lp:~danilo/launchpad/bug-814580-cold-db into lp:launchpad with lp:~danilo/launchpad/bug-814580 as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~danilo/launchpad/bug-814580-cold-db/+merge/69981

= Bug 814580: post-cleanup =

This renames the table PackagingJob to TranslationSharingJob (model code has already been changed).

This requires a downtime deployment since all appservers have to be restarted after this change is deployed.

== Proposed fix ==
-- 
https://code.launchpad.net/~danilo/launchpad/bug-814580-cold-db/+merge/69981
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/bug-814580-cold-db into lp:launchpad.
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql	2011-08-01 10:41:44 +0000
+++ database/schema/comments.sql	2011-08-01 10:41:45 +0000
@@ -1893,14 +1893,14 @@
 that we do not keep a history of these, so if someone sets it correctly,
 then someone else sets it incorrectly, we lose the first setting.';
 
-COMMENT ON TABLE PackagingJob IS 'A Job related to a Packaging entry.';
-COMMENT ON COLUMN PackagingJob.id IS '';
-COMMENT ON COLUMN PackagingJob.job IS 'The Job related to this PackagingJob.';
-COMMENT ON COLUMN PackagingJob.job_type IS 'An enumeration specifying the type of job to perform.';
-COMMENT ON COLUMN PackagingJob.productseries IS 'The productseries of the Packaging.';
-COMMENT ON COLUMN PackagingJob.sourcepackagename IS 'The sourcepackage of the Packaging.';
-COMMENT ON COLUMN PackagingJob.distroseries IS 'The distroseries of the Packaging.';
-COMMENT ON COLUMN PackagingJob.potemplate IS 'A POTemplate to restrict the job to or NULL if all templates need to be handled.';
+COMMENT ON TABLE TranslationSharingJob IS 'A Job related to a Packaging entry.';
+COMMENT ON COLUMN TranslationSharingJob.id IS '';
+COMMENT ON COLUMN TranslationSharingJob.job IS 'The Job related to this TranslationSharingJob.';
+COMMENT ON COLUMN TranslationSharingJob.job_type IS 'An enumeration specifying the type of job to perform.';
+COMMENT ON COLUMN TranslationSharingJob.productseries IS 'The productseries of the Packaging.';
+COMMENT ON COLUMN TranslationSharingJob.sourcepackagename IS 'The sourcepackage of the Packaging.';
+COMMENT ON COLUMN TranslationSharingJob.distroseries IS 'The distroseries of the Packaging.';
+COMMENT ON COLUMN TranslationSharingJob.potemplate IS 'A POTemplate to restrict the job to or NULL if all templates need to be handled.';
 
 -- Translator / TranslationGroup
 

=== added file 'database/schema/patch-2208-99-0.sql'
--- database/schema/patch-2208-99-0.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-99-0.sql	2011-08-01 10:41:45 +0000
@@ -0,0 +1,11 @@
+-- Copyright 2011 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+SET client_min_messages=ERROR;
+
+ALTER TABLE PackagingJob
+  RENAME TO TranslationSharingJob;
+
+ALTER INDEX packagingjob__job__idx
+  RENAME TO translationsharingjob__job__idx;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 0);

=== modified file 'lib/lp/translations/model/translationsharingjob.py'
--- lib/lp/translations/model/translationsharingjob.py	2011-08-01 10:41:44 +0000
+++ lib/lp/translations/model/translationsharingjob.py	2011-08-01 10:41:45 +0000
@@ -65,7 +65,7 @@
 class TranslationSharingJob(StormBase):
     """Base class for jobs related to a packaging."""
 
-    __storm_table__ = 'PackagingJob'
+    __storm_table__ = 'TranslationSharingJob'
 
     id = Int(primary=True)