browsertrix/backend/btrixcloud
Ilya Kreymer 28d39d8c4d
Fix migration to avoid duplicate collection slugs and names (#2318)
Follow-up to #2301 

Updates the 0039 migration to ensure collection slugs and names are
unique by:
- Removing all indexes
- Setting `slug` to random value
- Adding unique index to `slug` field.
- Attempting to set slug from name using `slug_from_name()`
- If rejected due to duplicate, append `-<counter>` at end of slug. Also
update name with ` <counter>`.
- Now that names should also be unique, add unique index on name field.

---------

Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2025-01-21 14:23:32 -08:00
..
migrations Fix migration to avoid duplicate collection slugs and names (#2318) 2025-01-21 14:23:32 -08:00
operator Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
__init__.py
auth.py
background_jobs.py Add missing os import 2025-01-13 15:15:48 -08:00
basecrawls.py Add last crawl and subscription status indicators to org list (#2273) 2025-01-14 10:57:06 -05:00
colls.py feat: Add slug to collections and use it in public collection URLs (#2301) 2025-01-15 22:44:32 -08:00
crawlconfigs.py Fix nightly tests: modify kubectl exec syntax for creating new minio bucket (#2097) 2024-10-21 17:41:19 -07:00
crawlmanager.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
crawls.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
db.py Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
emailsender.py Send subscription cancelation email (#2234) 2024-12-12 11:52:38 -08:00
invites.py fix: firstOrgAdmin being set to true even if invite was not for an admin (#2110) 2024-10-08 16:42:30 -07:00
k8sapi.py
main_bg.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
main_op.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
main.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
models.py Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
ops.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
orgs.py Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
pages.py Add pageCount to crawls and uploads and use in frontend for page counts (#2315) 2025-01-16 14:41:14 -08:00
pagination.py
profiles.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
storages.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
subs.py Send subscription cancelation email (#2234) 2024-12-12 11:52:38 -08:00
uploads.py Backend work for public collections (#2198) 2025-01-13 15:15:48 -08:00
users.py Add superuser endpoint to get user emails with org info (#2211) 2024-12-09 16:38:01 -08:00
utils.py feat: Add slug to collections and use it in public collection URLs (#2301) 2025-01-15 22:44:32 -08:00
version.py version: bump to 1.14.0-beta.0 for public collections! 2025-01-13 19:29:54 -08:00
webhooks.py