-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Allow null group assignment for users (Issue #867) #964
Conversation
Looks like something is broken with the new migration : https://travis-ci.org/userfrosting/UserFrosting/jobs/518564703#L873 |
The good news is, you're not crazy. I checked out your branch and can't replicate the Travis issue. Even if I replicate Travis env locally (ie not using the |
One thing to note, Travis complains about Actually, it could be a MySQL config thing. The error is different on PgSQL. Something might be different between Travis MySQL setup and local/Homestead one. |
Okay, so I believe the PgSQL error is actually related to this https://github.com/userfrosting/assets/releases/tag/5.0.4 |
And I believe it was fixed in Since this PR target UF 4.3, I suggest we leave it as is for now and look at it once we have released 4.2.1. We'll need to merge hotfix into develop at some point anyway. |
Is this something in the migration that needs to be fixed or is there possibly something in the test environment/configuration causing this? |
Codecov Report
@@ Coverage Diff @@
## develop #964 +/- ##
=============================================
+ Coverage 66.93% 66.96% +0.02%
- Complexity 1913 1918 +5
=============================================
Files 159 160 +1
Lines 6684 6693 +9
=============================================
+ Hits 4474 4482 +8
- Misses 2210 2211 +1
Continue to review full report at Codecov.
|
I think this will need to be a non-reversible change. I have been trying for hours to get a down migration to work that will set the column back to And now that I think about it, because this PR makes changes to templates and asset, without a way to reverse the changes in those files other than reverting back to a prior version of UF, there is really no reason to reverse this migration as it will break the interface by having an empty option in UI. |
If the change in the db is not reversed, and the files are reversed to 4.2.x, does it still works? Obviously, you won't be able to select "no group", but as long as the db still works, we should be good. |
It should still work. If that happened the only difference would be
|
I think removing it by default makes more sense if someone doesn't want to use groups at all. |
Hide group name if user is not in a group.
Fixed in 3467690.
I retested and can confirm the DB still works fine in this situation. |
I did too last and it does works fine. |
I think this is ready for a review.
Maybe someone else can suggest a better way to handle showing an empty option using select2.
Ref.: #867