Repository navigation
refactor: rename SMS table log to a general messages table - #1804
Open
beesaferoot wants to merge 3 commits into
Open
beesaferoot wants to merge 3 commits into
beesaferoot wants to merge 3 commits into
Conversation
dmohns
reviewed
Dec 2, 2026
dmohns
left a comment
Member
There was a problem hiding this comment.
Looking forward to this change 🙏 Added a tiny comment already
beesaferoot
force-pushed
the
refactor/migrate-sms-to-generic-message
branch
from
December 2, 2026 20:00
a34b42e to
c1593d2
Compare
beesaferoot
marked this pull request as ready for review
December 2, 2026 20:27
beesaferoot
force-pushed
the
refactor/migrate-sms-to-generic-message
branch
from
December 3, 2026 10:39
84d566f to
1592916
Compare
dmohns
reviewed
Dec 3, 2026
dmohns
left a comment
Member
There was a problem hiding this comment.
Few more small comments, other than that LGTM
| * @property string|null $trigger_type | ||
| * @property int|null $trigger_id | ||
| * @property string $body | ||
| * @property MessageChannel $channel |
Member
There was a problem hiding this comment.
Is this required? Isn't MessageChannel essentially duplicating messaging_plugin_slug ?
| * @property-read Sms|null $sms | ||
| * @property int $id | ||
| * @property int $message_id | ||
| * @property string $provider_message_id |
Member
There was a problem hiding this comment.
Should we call it external_message_id which signals "this is the id used in the third party system" ? Provider is a bit duplicated with AfricasTalkingMessage itself
| public function trigger(): MorphTo { | ||
| return $this->morphTo(); | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Should we add the inverse ProviderMessage link here? For example providerTransaction similar to how it's done with Transactions.
- `sms` table becomes `messages` with a `channel` column; gateway tables reference it by `message_id`; - `Sms` model and send pipeline become `Message*` abstract. - Prepare codebase for generic messaging gateway and plugin abstraction.
- `airtel_sms_messages` references `messages` by `message_id`; the SMSC id moves to `provider_message_id`. - Gateway resolver passes the `Message` record to the Airtel gateway.
- Remove the `channel` column and `MessageChannel` enum; the plugin slug already identifies the gateway. - Rename `provider_message_id` to `external_message_id` in gateway tables. - `messages` links to the gateway record through a `providerMessage` morph; gateway tables drop `sms_id`.
beesaferoot
force-pushed
the
refactor/migrate-sms-to-generic-message
branch
from
December 4, 2026 17:08
1592916 to
bf4b86a
Compare
Contributor
Author
|
I have addressed your comments. Kindly review @dmohns Thanks |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1793
This PR aims to be one of a sequence of efforts to achieve a generic messaging system on MPM as described in #1785
Major changes mage:
smstable becomesmessageswith achannelcolumn; gateway tables reference it bymessage_id;Smsmodel and send pipeline becomeMessage*abstract.Brief summary of the change made
Are there any other side effects of this change that we should be aware of?
Describe how you tested your changes?
Pull Request checklist
Please confirm you have completed any of the necessary steps below.