← Back to team overview

launchpad-dev team mailing list archive

Re: First cut at recipe db-schema patch

 

Michael Hudson wrote:
[..]

>> Some comments:
>>
>>  * Should SourcePackageRecipeData have an owner or created_by?
> 
> I don't think so.  SourcePackageRecipeData is really just a shared
> implementation detail of SourcePackageBuild and SourcePackageRecipe, and
> both of those should record all the interesting stuff.
> 
>>  * Why is SourcePackageRecipe a separate table to SourcePackageRecipeData? 
>> Since one references the other, the duplicated columns are not needed are 
>> they?  In fact the only additional column is the recipe text. Maybe I don't 
>> understand what you're trying to do with this?
> 
> Ah right, I meant to remove those duplicate columns from SPRecipeData.
> Essentially the reason they're separate is because SPRecipes have access
> control and a location in the UI, but SPRecipeDatas don't as many of
> them will be read-only versions referenced from SPBuild rows.

Hmm .. modelling is obviously a matter of taste. I personally would

  1 - do away with SourcePackageRecipeData altogether
  2 - link Branch records to SourcePackageRecipe rows using a
      'SourcePackageRecipeBranch' table
  3 - redefine the SourcePackageRecipe.recipe_data column
      as "recipe text NOT NULL"
  4 - redefine the SourcePackageBuild.manifest column as
      "manifest text NOT NULL"

unless there are compelling reasons to scatter the data as suggested.

[..]

Furthermore, I see that both SourcePackageRecipe and SourcePackageBuild
have a distroseries foreign key. Is there a particular reason for that?
I guess it could be omitted from one of the tables, probably
SourcePackageBuild, no?

Also, I don't see either the component or the pocket captured anywhere.
I guess we need the latter at least and it should probably sit on the
SourcePackageRecipe table.

Last but not least, the SourcePackageBuild.estimated_build_duration
column is obsolete now. BuildQueue.estimated_duration should be used
instead.

Best regards

-- 
Muharem Hrnjadovic <muharem@xxxxxxxxxx>
Public key id   : B2BBFCFC
Key fingerprint : A5A3 CC67 2B87 D641 103F  5602 219F 6B60 B2BB FCFC

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References