Closed dhruvkb closed 1 year ago
API Developer Docs Preview: Ready
https://wordpress.github.io/openverse-api/_preview/1040
Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.
You can check the GitHub pages deployment action list to see the current status of the deployments.
Wait, I might have figured it out.
As much as I'd like to, I don't think I'll get to review this in the week, so tagging other folks in case they can/want to.
The migration 0052 is largely a no-op with only 2 actual SQL statements! This can be verified with the sqlmigrate
command.
$ just dc exec web python manage.py sqlmigrate api 0052
BEGIN;
--
-- Add field audioset to audio
-- (no-op)
--
-- Alter field identifier on audioreport
CREATE INDEX "nsfw_reports_audio_identifier_ebe3a079" ON "nsfw_reports_audio" ("identifier");
--
-- Alter field identifier on deletedaudio
-- (no-op)
--
-- Alter field identifier on deletedimage
-- (no-op)
--
-- Alter field identifier on imagereport
CREATE INDEX "nsfw_reports_identifier_f0374e03" ON "nsfw_reports" ("identifier");
--
-- Alter field identifier on matureaudio
-- (no-op)
--
-- Alter field identifier on matureimage
-- (no-op)
--
-- Rename field identifier on audioreport to media_obj
-- (no-op)
--
-- Rename field identifier on deletedaudio to media_obj
-- (no-op)
--
-- Rename field identifier on deletedimage to media_obj
-- (no-op)
--
-- Rename field identifier on imagereport to media_obj
-- (no-op)
--
-- Rename field identifier on matureaudio to media_obj
-- (no-op)
--
-- Rename field identifier on matureimage to media_obj
-- (no-op)
COMMIT;
This PR has migrations. Please rebase it before merging to ensure that conflicting migrations are not introduced.
Fixes
Fixes #1036 by @sarayourfriend
Description
Currently a search result needs several DB queries to populate the page.
Hit
instances from ESAudioSet
andMatureAudio
instances. For each image search for theMatureImage
instances.This PR
OpenledgerModel
in more places for consistent timestamping fieldsThis is an example query for audio, it includes the related
matureaudio
andaudioset
data too!Testing Instructions
grep
.just dc logs -f web | grep -E '\[db]'
.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin
``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ```