feat(ee): add `name` field for user model, add api to update it
For closing https://github.com/TabbyML/tabby/issues/2054
-
add new migration to alter
userstablenamecould beNULLfor back compatibility
-
update
UserDAOto addnamefield, addupdate_user_nameto executeSQL UPDATE -
implement new endpoint
update_user_nameforAuthenticationService -
implement new mutation endpoint
update_user_name -
run
make update-db-schemato updateee/tabby-db/schema/schema.sql&ee/tabby-db/schema/schema.svg -
run
tabby-schema/examples/update-schema.rsto updateschema.graphqlfile -
udpate
README
Manual test result:
autofix failed due to
error[E0601]: `main` function not found in crate `tabby`
cargo_bloat failed due to
Resource not accessible by integration
Test coverage failed due to:
There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {'detail': ErrorDetail(string='Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 678s.', code='throttled')}
All of errors seem irrelevant to my change
code coverage report Rate limit reached error, and cargo bloat report Resource not accessible by integration. I suspect this is due to external pull request from forked repository, but not very sure about it.
Otherwise LGTM.
As a followup, please fill user.name field when user registered from oauth identity providers.
Correct me if I'm wrong, currently when user register from oauth, we only fetch user email info then create user accordingly.
Now we also want to fetch username info, and call update_user_name during the register process?
One more concern is, in this PR I didn't put UNIQUE constraint on the new name field, just like email or auth_token, this is more like product decision, may need your suggestion. cc: @wsxiaoys
Please also rebase against main