-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable table names #218
Comments
We can implement it but atm I have not much time. If you create a PR pls do it for the |
And the super best would be if you can add this new config to the documentation at https://github.com/Astrotomic/notifynder-documentation |
If you have an issue only with "notifications" table renaming, and others are just fine, you can just use custom notification model where you would extend the Notifications class and override table name:
However, it might not help you in this case. |
Yeah, the issue I'm having is that all of the tables have to conform to the standard, which means that I would have to extend each of the models to replace the table names, and then also replace the relationship definitions to correspond to the new models, which is a bit more modifying of the library than I'd like to do ideally. |
@LukeTowers can you pls take a look in the last commit $resolver = app('notifynder.resolver.model');
$resolver->setTable(Notification::class, 'prefixed_notifications'); |
@Gummibeer That could work, although I have to use 5.1 on my project. Does the current version of this library support 5.1? |
Yes it does. Take a look in the travis tests or the official doc page for more details. |
@LukeTowers have you tested it? In my tests it's working. If it is also for you I will merge it into |
@Gummibeer Haven't tested it yet as my project is using the previous version of the library and I haven't upgraded because of breaking changes yet and lack of time to reconcile the implementation with the latest version. I'll try to do that sometime soon though |
Ok, cause of the successful tests and the, in my eyes, implemented requested feature - I will close this issue after release this new version. |
It's tagged now: https://github.com/fenos/Notifynder/releases/tag/4.1.0 |
@Gummibeer Thanks. I'll let you know if anything goes wrong when implementing it. |
Are there any plans to introduce configurable table names into this library? I'm working with an existing project that has a naming convention for the tables in the database, which means that I need to have these tables follow that strict naming convention.
I know that I could always just extend the model classes present with my own and modify the table names where applicable, but I would love it if the table names were settable through a config file. cmgmyr/laravel-messenger is an excellent example of how to implement this functionality and I would love for it to be present in this library.
If this functionality were to be implemented via a pull request, would it be accepted (assuming that it followed the guidelines of this repository)?
The text was updated successfully, but these errors were encountered: