launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01370
Readable diff
The sampledata changes will create a lot of noise in the diff. Here are the
changes in other files.
--
https://code.launchpad.net/~henninge/launchpad/db-devel-translationmessage-pofile/+merge/37563
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~henninge/launchpad/db-devel-translationmessage-pofile into lp:launchpad.
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql 2010-09-23 19:27:24 +0000
+++ database/schema/comments.sql 2010-10-04 22:56:09 +0000
@@ -941,8 +941,6 @@
COMMENT ON TABLE TranslationMessage IS 'This table stores a concrete
translation for a POTMsgSet message. It knows who, when and where did it,
and whether it was reviewed by someone and when was it reviewed.';
-COMMENT ON COLUMN TranslationMessage.pofile IS 'The translation file which
-this translation message is part of.';
COMMENT ON COLUMN TranslationMessage.potmsgset IS 'The template message which
this translation message is a translation of.';
COMMENT ON COLUMN TranslationMessage.date_created IS 'The date we saw this
=== 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 2010-10-04 22:56:09 +0000
@@ -0,0 +1,15 @@
+-- Copyright 2010 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 INDEX translationmessage__pofile__idx;
+
+ALTER TABLE TranslationMessage
+DROP CONSTRAINT translationmessage__pofile__fk;
+
+ALTER TABLE TranslationMessage
+DROP COLUMN pofile;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 0);
+
=== modified file 'lib/lp/translations/interfaces/translationmessage.py'
--- lib/lp/translations/interfaces/translationmessage.py 2010-09-03 15:20:05 +0000
+++ lib/lp/translations/interfaces/translationmessage.py 2010-10-04 22:56:09 +0000
@@ -103,10 +103,6 @@
title=_("The ID for this translation message"),
readonly=True, required=True)
- pofile = Object(
- title=_("The translation file from where this translation comes"),
- readonly=False, required=False, schema=IPOFile)
-
browser_pofile = Object(
title=_("The translation file from where this translation comes"),
readonly=False, required=False, schema=IPOFile)
=== modified file 'lib/lp/translations/model/translationmessage.py'
--- lib/lp/translations/model/translationmessage.py 2010-09-03 16:01:01 +0000
+++ lib/lp/translations/model/translationmessage.py 2010-10-04 22:56:09 +0000
@@ -123,7 +123,6 @@
'This translation message already exists in the database.')
self.id = None
- self.pofile = None
self.browser_pofile = pofile
self.potemplate = pofile.potemplate
self.language = pofile.language
@@ -236,7 +235,6 @@
_table = 'TranslationMessage'
- pofile = ForeignKey(foreignKey='POFile', dbName='pofile', notNull=False)
browser_pofile = None
potemplate = ForeignKey(
foreignKey='POTemplate', dbName='potemplate', notNull=False,
=== modified file 'lib/lp/translations/tests/pofiletranslator.txt'
--- lib/lp/translations/tests/pofiletranslator.txt 2010-09-03 14:53:09 +0000
+++ lib/lp/translations/tests/pofiletranslator.txt 2010-10-05 07:03:37 +0000
@@ -35,10 +35,9 @@
>>> cur.execute("""
... INSERT INTO TranslationMessage(
- ... pofile, potmsgset, msgstr1, origin, submitter, language
+ ... potmsgset, msgstr1, origin, submitter, language
... ) VALUES (
- ... %(pofile_id)s, %(potmsgset_id)s, 1, 1, %(stub_id)s,
- ... %(language_id)s)
+ ... %(potmsgset_id)s, 1, 1, %(stub_id)s, %(language_id)s)
... """, vars())
>>> posubmission_id, date_touched = pofiletranslator(stub_id, pofile_id)
@@ -59,10 +58,9 @@
>>> cur.execute("""
... INSERT INTO TranslationMessage(
- ... pofile, potmsgset, msgstr1, origin, submitter, language
+ ... potmsgset, msgstr1, origin, submitter, language
... ) VALUES (
- ... %(pofile_id)s, %(potmsgset_id)s, 2, 1, %(stub_id)s,
- ... %(language_id)s)
+ ... %(potmsgset_id)s, 2, 1, %(stub_id)s, %(language_id)s)
... """, vars())
>>> new_posubmission_id, new_date_touched = pofiletranslator(
... stub_id, pofile_id)
References