Skip to content
  • Damien Lespiau's avatar
    series: Store the last revision in the series object · d97ca94a
    Damien Lespiau authored
    
    
    I've been postponing this for some time, but it's better to have a
    foreign key to the latest series than caching some of its data on the
    Series object.
    
    We still want that link on Series, because retrieving the data held on
    the revision is a simple JOIN, so we can still have our O(1) number of
    SQL queries when retrieving data for the series list page.
    
    While at it and to limit the number of migration steps, we move the
    n_patches to SeriesRevision, where it should have been in the first
    place. Also the version field can simply be the one on last_revision
    now.
    
    Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    d97ca94a