Files
mostlymatter/store/sqlstore
jfrerich bbfcac84c9 [MM-13721] Fix the etag function GetEtagForProfilesNotInTeam (#10360)
* Initial solution for Draft PR

* Reformat tabs to spaces for readability

* Remove my comments and debugging lines for Core Commiter to see changes
more easily

* Remove all comments and show only code changes

* Match indentation spacing of new query to old query to make diff reading
easier for core committer

* Remove everything except what want to show core commiter

* Restrucure query and resulting etag value.
get number of users not in team from SELECT subquery.
etag return values is now of the form
<model.CurrenVersion>.<UpdateAt>.<number_profiles_not_int_team>

* Remove skipped test for solution to https://mattermost.atlassian.net/browse/MM-13721.
Remove comment for failing description of test
store u4 with prepended "u4".  Similar to u1, u2, u3.  This is easier
for debugging when looking in the database
Added skipped test:
  check that etag does not change when a user, not in team 1, is added
  to different team.  UpdateAt will change, but users in the set does
  not

* Remove skipped test for solution to https://mattermost.atlassian.net/browse/MM-13721.
Remove comment for failing description of test
store u4 with prepended "u4".  Similar to u1, u2, u3.  This is easier
for debugging when looking in the database
Added skipped test:
  check that etag does not change when a user, not in team 1, is added
  to different team.  UpdateAt will change, but users in the set does
  not

* remove commented out tests

* Restructure and simplify the SQL query for GetEtagForProfilesNotInTeam.
- Build the query to get all profiles not in a specified team
- select latest UpdateAt Value by getting Max value from UpdateAt field.
- select Number of profiles not in Team from count of the returned Ids

The previous query required building a complex query with multiple
joins and repeated code in a select subquery, and derived table

* Format SQL styling indentation, spaces around equal signs, and new lines

* Add description for skipped test
2019-02-27 18:51:06 -08:00
..
2019-01-10 15:17:31 -05:00
2019-01-10 15:17:31 -05:00
2017-10-06 11:12:10 -04:00
2018-10-10 10:55:12 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00