Code review comment for lp:~henninge/launchpad/db-devel-translationmessage-pofile
- db-devel-translationmessage-pofile
- Merge into db-devel
Revision history for this message
Henning Eggers (henninge) wrote : | # |
1 | === modified file 'database/schema/comments.sql' |
2 | --- database/schema/comments.sql 2010-09-23 19:27:24 +0000 |
3 | +++ database/schema/comments.sql 2010-10-04 22:56:09 +0000 |
4 | @@ -941,8 +941,6 @@ |
5 | COMMENT ON TABLE TranslationMessage IS 'This table stores a concrete |
6 | translation for a POTMsgSet message. It knows who, when and where did it, |
7 | and whether it was reviewed by someone and when was it reviewed.'; |
8 | -COMMENT ON COLUMN TranslationMessage.pofile IS 'The translation file which |
9 | -this translation message is part of.'; |
10 | COMMENT ON COLUMN TranslationMessage.potmsgset IS 'The template message which |
11 | this translation message is a translation of.'; |
12 | COMMENT ON COLUMN TranslationMessage.date_created IS 'The date we saw this |
13 | |
14 | === added file 'database/schema/patch-2208-99-0.sql' |
15 | --- database/schema/patch-2208-99-0.sql 1970-01-01 00:00:00 +0000 |
16 | +++ database/schema/patch-2208-99-0.sql 2010-10-04 22:56:09 +0000 |
17 | @@ -0,0 +1,15 @@ |
18 | +-- Copyright 2010 Canonical Ltd. This software is licensed under the |
19 | +-- GNU Affero General Public License version 3 (see the file LICENSE). |
20 | + |
21 | +SET client_min_messages=ERROR; |
22 | + |
23 | +DROP INDEX translationmessage__pofile__idx; |
24 | + |
25 | +ALTER TABLE TranslationMessage |
26 | +DROP CONSTRAINT translationmessage__pofile__fk; |
27 | + |
28 | +ALTER TABLE TranslationMessage |
29 | +DROP COLUMN pofile; |
30 | + |
31 | +INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 0); |
32 | + |
33 | |
34 | === modified file 'lib/lp/translations/interfaces/translationmessage.py' |
35 | --- lib/lp/translations/interfaces/translationmessage.py 2010-09-03 15:20:05 +0000 |
36 | +++ lib/lp/translations/interfaces/translationmessage.py 2010-10-04 22:56:09 +0000 |
37 | @@ -103,10 +103,6 @@ |
38 | title=_("The ID for this translation message"), |
39 | readonly=True, required=True) |
40 | |
41 | - pofile = Object( |
42 | - title=_("The translation file from where this translation comes"), |
43 | - readonly=False, required=False, schema=IPOFile) |
44 | - |
45 | browser_pofile = Object( |
46 | title=_("The translation file from where this translation comes"), |
47 | readonly=False, required=False, schema=IPOFile) |
48 | |
49 | === modified file 'lib/lp/translations/model/translationmessage.py' |
50 | --- lib/lp/translations/model/translationmessage.py 2010-09-03 16:01:01 +0000 |
51 | +++ lib/lp/translations/model/translationmessage.py 2010-10-04 22:56:09 +0000 |
52 | @@ -123,7 +123,6 @@ |
53 | 'This translation message already exists in the database.') |
54 | |
55 | self.id = None |
56 | - self.pofile = None |
57 | self.browser_pofile = pofile |
58 | self.potemplate = pofile.potemplate |
59 | self.language = pofile.language |
60 | @@ -236,7 +235,6 @@ |
61 | |
62 | _table = 'TranslationMessage' |
63 | |
64 | - pofile = ForeignKey(foreignKey='POFile', dbName='pofile', notNull=False) |
65 | browser_pofile = None |
66 | potemplate = ForeignKey( |
67 | foreignKey='POTemplate', dbName='potemplate', notNull=False, |
68 | |
69 | === modified file 'lib/lp/translations/tests/pofiletranslator.txt' |
70 | --- lib/lp/translations/tests/pofiletranslator.txt 2010-09-03 14:53:09 +0000 |
71 | +++ lib/lp/translations/tests/pofiletranslator.txt 2010-10-05 07:03:37 +0000 |
72 | @@ -35,10 +35,9 @@ |
73 | |
74 | >>> cur.execute(""" |
75 | ... INSERT INTO TranslationMessage( |
76 | - ... pofile, potmsgset, msgstr1, origin, submitter, language |
77 | + ... potmsgset, msgstr1, origin, submitter, language |
78 | ... ) VALUES ( |
79 | - ... %(pofile_id)s, %(potmsgset_id)s, 1, 1, %(stub_id)s, |
80 | - ... %(language_id)s) |
81 | + ... %(potmsgset_id)s, 1, 1, %(stub_id)s, %(language_id)s) |
82 | ... """, vars()) |
83 | >>> posubmission_id, date_touched = pofiletranslator(stub_id, pofile_id) |
84 | |
85 | @@ -59,10 +58,9 @@ |
86 | |
87 | >>> cur.execute(""" |
88 | ... INSERT INTO TranslationMessage( |
89 | - ... pofile, potmsgset, msgstr1, origin, submitter, language |
90 | + ... potmsgset, msgstr1, origin, submitter, language |
91 | ... ) VALUES ( |
92 | - ... %(pofile_id)s, %(potmsgset_id)s, 2, 1, %(stub_id)s, |
93 | - ... %(language_id)s) |
94 | + ... %(potmsgset_id)s, 2, 1, %(stub_id)s, %(language_id)s) |
95 | ... """, vars()) |
96 | >>> new_posubmission_id, new_date_touched = pofiletranslator( |
97 | ... stub_id, pofile_id) |
The sampledata changes will create a lot of noise in the diff. Here are the
changes in other files.