-
-
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
118 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 | ||
|
30 changes: 30 additions & 0 deletions
30
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,30 @@ | ||
DROP MATERIALIZED VIEW latest_versions; | ||
|
||
CREATE MATERIALIZED VIEW latest_versions (namespace, name, synopsis, package_id, version, license, uploaded_at, revised_at) | ||
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.