Page MenuHomeSoftware Heritage

Fix the db initialization stack
ClosedPublic

Authored by douardda on Mar 1 2021, 4:07 PM.

Details

Summary

was completely off, but had no test, so...

Diff Detail

Repository
rDPROV Provenance database
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.
This revision is now accepted and ready to land.Mar 1 2021, 5:23 PM
ardumont added a subscriber: ardumont.

looks like it's doing the job ;)

I was wondering if it would not be clearer to alter the schema at the end of the file
(or in a subsequent file). Kinda what's done for indexes.

\if :dbflavor_with_path
alter table content_early_in_rev
add column loc bigint not null;  -- location of the content relative to the revision root directory

comment on column content_early_in_rev.loc is 'Location of content in revision';
...
\end

But that would split the reading so let's keep it that way
¯\_(ツ)_/¯

looks like it's doing the job ;)

I was wondering if it would not be clearer to alter the schema at the end of the file
(or in a subsequent file). Kinda what's done for indexes.

\if :dbflavor_with_path
alter table content_early_in_rev
add column loc bigint not null;  -- location of the content relative to the revision root directory

comment on column content_early_in_rev.loc is 'Location of content in revision';
...
\end

But that would split the reading so let's keep it that way
¯\_(ツ)_/¯

yeah I've been playing with this idea also; don't like too much the "dandling" comma dance...

Build is green

Patch application report for D5172 (id=18528)

Rebasing onto 4bb53c1e45...

Current branch diff-target is up to date.
Changes applied before test
commit 5380ab8fbc0b166ebf92cdea00f59892f26adb31
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Mar 1 14:39:40 2021 +0100

    Fix the db initialization stack
    
    was completely off, but had no test, so...

See https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/1/ for more details.

This revision was automatically updated to reflect the committed changes.