-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NO-ISSUE] Show last upload or revision date in package listings
- Loading branch information
Showing
13 changed files
with
119 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -448,6 +448,7 @@ executable flora-cli | |
, sel | ||
, text | ||
, text-display | ||
, time | ||
, transformers | ||
, uuid | ||
, vector | ||
|
31 changes: 31 additions & 0 deletions
31
migrations/20240906101200_add_upload_and_revision_times_to_latest_versions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- migrate:up | ||
drop materialized view latest_versions; | ||
|
||
create materialized view latest_versions ( | ||
namespace, | ||
name, | ||
synopsis, | ||
package_id, | ||
version, | ||
license) as | ||
select distinct on (p.package_id) | ||
p.namespace | ||
, p.name | ||
, r.synopsis | ||
, p.package_id | ||
, r.version | ||
, r.license | ||
, r.uploaded_at | ||
, r.revised_at | ||
from "packages" as p | ||
inner join "releases" as r on p."package_id" = r."package_id" | ||
where p.status = 'fully-imported' | ||
and ((r."deprecated" is distinct from true) | ||
) | ||
group by p.namespace, p.name, synopsis, p.package_id, r.version, license, r.uploaded_at, r.revised_at | ||
order by p.package_id, version desc; | ||
|
||
create index on latest_versions (name); | ||
create index on latest_versions (namespace, name); | ||
create unique index on latest_versions (name, namespace, version); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.