Merge lp:~rockstar/launchpad/recipe-description into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Approved by: | Björn Tillenius on 2010-03-24 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | not available |
| Proposed branch: | lp:~rockstar/launchpad/recipe-description |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
186 lines (+52/-9) 7 files modified
database/schema/patch-2207-37-0.sql (+9/-0) lib/lp/code/interfaces/sourcepackagerecipe.py (+6/-2) lib/lp/code/model/sourcepackagerecipe.py (+3/-1) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+22/-0) lib/lp/code/tests/test_recipebuilder.py (+1/-1) lib/lp/code/tests/test_sourcepackagerecipe.py (+6/-3) lib/lp/testing/factory.py (+5/-2) |
| To merge this branch: | bzr merge lp:~rockstar/launchpad/recipe-description |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Björn Tillenius (community) | db | 2010-03-16 | Approve on 2010-03-24 |
| Stuart Bishop | db | 2010-03-16 | Approve on 2010-03-17 |
| Brad Crittenden (community) | code | 2010-03-16 | Approve on 2010-03-16 |
|
Review via email:
|
|||
Description of the Change
This branch adds a description to SourcePackageRe
realized that it was missing from the model, and we needed it based on my
mockups and the fact that recipes are very hard to decipher the purpose of
otherwise.
| Björn Tillenius (bjornt) wrote : | # |
On Tue, Mar 16, 2010 at 07:41:20PM -0000, Paul Hummer wrote:
> === added file 'database/
> --- database/
> +++ database/
> @@ -0,0 +1,9 @@
> +-- Copyright 2010 Canonical Ltd. This software is licensed under the
> +-- GNU Affero General Public License version 3 (see the file LICENSE).
> +
> +SET client_
> +
> +ALTER TABLE SourcePackageRecipe
> +ADD COLUMN description TEXT;
> +
> +INSERT INTO LaunchpadDataba
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -71,6 +71,10 @@
> constraint=
> description=_("The name of this recipe."))
>
> + description = Text(
> + title=_
> + description=_('A short description of the recipe.'))
> +
The interface says that the description can't be None, while the db
patch says that it can. What should it be? Judging from your comments,
it seems that it should be not-None, though.
> builder_recipe = Attribute(
> _("The bzr-builder data structure for the recipe."))
>
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -58,6 +58,7 @@
> sourcepackagena
>
> name = Unicode(
> + description = StringCol(
StringCol from sqlobject on a storm object? Does this even work? A small
test might be useful :)
review needsfixing
--
Björn Tillenius | https:/
| Björn Tillenius (bjornt) wrote : | # |
As discussed on IRC, the interface now says that the description can be None, while the db patch says it can. Paul said he would make things consistent (description can't be None).

Fine. patch-2207- 37-0.sql.
Consider making the new description column NOT NULL if the UI really doesn't make sense without one set.