feat: view the user's app version on the User Management page#20306
feat: view the user's app version on the User Management page#20306aviv926 wants to merge 13 commits intoimmich-app:mainfrom
Conversation
This reverts commit 25ff528.
danieldietzler
left a comment
There was a problem hiding this comment.
Seems fine to me, thanks!
There was a problem hiding this comment.
Remove this. src/migrations are the old migrations, all migrations are now in schema/migrations
There was a problem hiding this comment.
Maybe we should update the documentation regarding this as I used the documentation to understand how to work with migrations
There was a problem hiding this comment.
- Move the migration file to folder
./server/src/schema/migrationsin your code editor.
Isn't that correct? 🤔
There was a problem hiding this comment.
Yes, but that doesn't explain deleting the original file in server/src/schema after npm run migrations
Or am I just not understanding it correctly 🙇🏻♂️
| @UpdateIdColumn({ index: true }) | ||
| updateId!: Generated<string>; | ||
|
|
||
| @Column({ type: 'character varying', nullable: true, default: null }) |
There was a problem hiding this comment.
I don't think you need a default if it's null anyways?
There was a problem hiding this comment.
I wasn't sure, so I used the logic as we use in
@Column({ type: 'character varying', nullable: true, default: null })
color!: string | null;
If you think it's not necessary (as it seems I will remove it from appVersion Column)
|
Surely this should be per session not per user? Also this could probably be called "Client version". |
Yeah we already talked about this elsewhere too and decided on per session. |
|
@alextran1502 |
|
The preview label does not work for forks. I don't think you've changed this to be per-session yet, have you? That'd be a requirement as that's the only way this makes sense. |
|
Closed. New PR in with the required changes in #21345 |
Description
This PR adds information for the system administrator about which version each user is currently using. This is updated every time the user accesses one of the Android or iPhone mobile applications only by information coming from the User-Agent header.
This change also adds a new database column called appVersion to store the information for each user.
How Has This Been Tested?
I tried accessing the app for Android and the app for iPhone and saw that the version is updated on the User Management page even if a version update is made to the app and even if the user accesses it.
To ensure that the latest version is always displayed for each user, it updates the App version every time a request is sent to the server by the user from one of the mobile applications.
I tried accessing from the browser and making sure that it does not affect the App version on the User Management page
Although it is not possible to access with port 2283 as we access from the app (I am not sure if this makes any difference at all?), I was able to connect with port 3000 as we access on the computer and verify that the App version did not change as expected.
Full disclosure: I'm not good with typescript but immich was an inspiration for me to start learning TS so I hope what's here is good enough.
Yes I had to use ML to solve some problems along the way and work with regex and kysely so I hope it's not too bad.
I tried to do all the testing to make sure it would be good enough :)
Screenshots (if appropriate)
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)