Skip to content
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

Run migrations in User model afterLogin() #1257

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

mjauvin
Copy link
Member

@mjauvin mjauvin commented Nov 27, 2024

User model now handles running the migrations in its afterLogin() method.

@mjauvin mjauvin added maintenance PRs that fix bugs, are translation changes or make only minor changes needs review Issues/PRs that require a review from a maintainer labels Nov 27, 2024
@mjauvin mjauvin added this to the 1.2.7 milestone Nov 27, 2024
@mjauvin mjauvin self-assigned this Nov 27, 2024
@bennothommo
Copy link
Member

This is burying that sort of functionality deep, in a place I wouldn't think to look if I was looking for it.

Could we not just add a listener in the Backend's service provider for the backend.user.login event and just fire the functionality there?

Or even better, begone with it completely. Migrations should be explicitly run via an action (installing plugins, running the console command) - not arbitrarily when logging in.

@mjauvin
Copy link
Member Author

mjauvin commented Nov 27, 2024

This is burying that sort of functionality deep, in a place I wouldn't think to look if I was looking for it.

That's why they invented "grep"! 😝

Could we not just add a listener in the Backend's service provider for the backend.user.login event and just fire the functionality there?

I don't mind, as long as we all agree.

Or even better, begone with it completely. Migrations should be explicitly run via an action (installing plugins, running the console command) - not arbitrarily when logging in.

The main reason to keep the functionality is for users without shell access: they can run the migrations just by login into the backend.

Personally, I don't care about this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PRs that fix bugs, are translation changes or make only minor changes needs review Issues/PRs that require a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants