Skip to content

add default sms daily limit#2802

Open
jzbahrai wants to merge 2 commits intomainfrom
task/update-limit
Open

add default sms daily limit#2802
jzbahrai wants to merge 2 commits intomainfrom
task/update-limit

Conversation

@jzbahrai
Copy link
Copy Markdown
Collaborator

Summary | Résumé

Added a default sms limit to be 1500 over 1000. Only change the default if the current limit is 1000.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

TODO: Fill in test instructions for the reviewer.

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

Copilot AI review requested due to automatic review settings March 18, 2026 14:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the default daily SMS sending limit to 1500 messages/day and migrates existing services that are still on the previous default limit.

Changes:

  • Add an Alembic migration to update services.sms_daily_limit from 1000 to 1500 where it is still set to the old default.
  • Introduce DEFAULT_SMS_DAILY_LIMIT = 1500 and use it as the fallback in Service.from_json.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
migrations/versions/0508_update_daily_sms_limit.py Data migration to bump daily SMS limit from 1000 → 1500 for services still using the old default.
app/models.py Add a daily SMS default constant and apply it when deserializing a Service from JSON.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +26 to +32
op.execute(
"""
UPDATE services
SET sms_daily_limit = 1000
WHERE sms_daily_limit = 1500
"""
)
Copy link
Copy Markdown
Contributor

@smcmurtry smcmurtry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the upgrade and downgrade locally, it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants