Add hostname field to Conference#4662
Conversation
- Add hostname CharField to Conference model with max_length=255 - Expose hostname in GraphQL Conference type - Add hostname to admin conference details fieldset - Create database migration 0058_conference_hostname Closes #4661 Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Adds a One issue to address
Only one database row can have PostgreSQL allows multiple
Minor: the data migration loop does individual |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4662 +/- ##
=======================================
Coverage 92.52% 92.52%
=======================================
Files 359 359
Lines 10791 10799 +8
Branches 821 821
=======================================
+ Hits 9984 9992 +8
Misses 696 696
Partials 111 111 🚀 New features to boost your workflow:
|
|
@claude handle this feedback: Missing uniqueness constraint No tests |
|
Claude finished @marcoacierno's task in 1m 5s —— View job Addressing Feedback
Changes Made
|
- Add unique=True to hostname CharField in Conference model - Update migration to include uniqueness constraint - Add test for hostname GraphQL field query Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@claude tests are failing because of the factory empty hostname. Make it set an unique hostname by default |
|
Claude finished @marcoacierno's task in 49s —— View job Fixing Factory Hostname Conflict
Changes MadeUpdated hostname = factory.Sequence(lambda n: "conference{}.example.com".format(n))This ensures each Conference created in tests gets a unique hostname (conference0.example.com, conference1.example.com, etc.), fixing the unique constraint violations. |
Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
|
@claude review |
|
Claude finished @marcoacierno's task in 58s —— View job Code Review Complete
Overall: Looks good to merge ✓ The implementation is clean and follows the project patterns. Previous feedback (unique constraint, test coverage, factory fix) has been addressed. Changes Summary
Minor Considerations (non-blocking)
|
|
@claude update the migration to:
for the data migration, set the default according to this table conference codes -> hostname: |
|
Claude finished @marcoacierno's task in 1m 8s —— View job Updating Migration with Data Migration
Changes MadeUpdated
The migration also includes a reverse function that resets all hostnames to empty string. |
Split migration into 3 steps: 1. Add hostname field without unique constraint 2. Run data migration to set hostnames based on conference codes 3. Add unique constraint Hostname mapping: - pycon2026, pycon2025, 2024, pycon2023 -> year.pycon.it - pycon12 -> 2022.pycon.it - pycon11 -> 2020.pycon.it - testconf -> test.pycon.it Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
|
@claude review |
|
Claude finished @marcoacierno's task in 54s —— View job Code Review
Overall: Good to merge with one fix needed The implementation is clean and follows project patterns. Previous feedback has been addressed well (unique constraint, test coverage, factory fix, three-step migration). Changes Summary
Issue FoundBug in data migration — The migration uses # Current (incorrect)
"pycon2024": "2024.pycon.it",
# Should be
"2024": "2024.pycon.it",Your original instruction specified: Everything Else Looks Good
|
Summary
Closes #4661