Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/backfill.py
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | "release": [ | ||||||||||||
("a.name", "author_name"), | ("a.name", "author_name"), | ||||||||||||
("a.email", "author_email"), | ("a.email", "author_email"), | ||||||||||||
("a.fullname", "author_fullname"), | ("a.fullname", "author_fullname"), | ||||||||||||
], | ], | ||||||||||||
"snapshot": ["id", "object_id"], | "snapshot": ["id", "object_id"], | ||||||||||||
"origin": ["url"], | "origin": ["url"], | ||||||||||||
"origin_visit": ["visit", "type", ("origin.url", "origin"), "date",], | "origin_visit": ["visit", "type", ("origin.url", "origin"), "date",], | ||||||||||||
"origin_visit_status": [ | "origin_visit_status": [ | ||||||||||||
"visit", | ("origin_visit_status.visit", "visit"), | ||||||||||||
("origin.url", "origin"), | ("origin.url", "origin"), | ||||||||||||
"date", | ("origin_visit_status.date", "date"), | ||||||||||||
("origin_visit.type", "type"), | |||||||||||||
"snapshot", | "snapshot", | ||||||||||||
"status", | "status", | ||||||||||||
"metadata", | "metadata", | ||||||||||||
], | ], | ||||||||||||
} | } | ||||||||||||
JOINS = { | JOINS = { | ||||||||||||
"release": ["person a on release.author=a.id"], | "release": ["person a on release.author=a.id"], | ||||||||||||
"revision": [ | "revision": [ | ||||||||||||
"person a on revision.author=a.id", | "person a on revision.author=a.id", | ||||||||||||
"person c on revision.committer=c.id", | "person c on revision.committer=c.id", | ||||||||||||
], | ], | ||||||||||||
"origin_visit": ["origin on origin_visit.origin=origin.id"], | "origin_visit": ["origin on origin_visit.origin=origin.id"], | ||||||||||||
"origin_visit_status": ["origin on origin_visit_status.origin=origin.id"], | "origin_visit_status": [ | ||||||||||||
"origin on origin_visit_status.origin=origin.id", | |||||||||||||
# Joining on origin_visit to be able to backfill before the | |||||||||||||
# origin_visit_status.type is populated by a migration script | |||||||||||||
# TODO remove this when origin_visit_status.type is fully populated | |||||||||||||
"origin_visit using (origin, visit)", | |||||||||||||
], | |||||||||||||
olasdUnsubmitted Not Done Inline Actions
olasd: | |||||||||||||
Done Inline Actionsthanks, indeed, it's a lot more readable vsellier: thanks, indeed, it's a lot more readable | |||||||||||||
"raw_extrinsic_metadata": [ | "raw_extrinsic_metadata": [ | ||||||||||||
"metadata_authority on " | "metadata_authority on " | ||||||||||||
"raw_extrinsic_metadata.authority_id=metadata_authority.id", | "raw_extrinsic_metadata.authority_id=metadata_authority.id", | ||||||||||||
"metadata_fetcher on raw_extrinsic_metadata.fetcher_id=metadata_fetcher.id", | "metadata_fetcher on raw_extrinsic_metadata.fetcher_id=metadata_fetcher.id", | ||||||||||||
], | ], | ||||||||||||
} | } | ||||||||||||
▲ Show 20 Lines • Show All 383 Lines • Show Last 20 Lines |