Deluan Quintão
fcb5e1b806
fix(server): fix case-insensitive sort order and add indexes to improve performance ( #3425 )
...
* refactor(server): better sort mappings
* refactor(server): simplify GetIndex
* fix: recreate tables and indexes using proper collation
Also add tests to ensure proper collation
* chore: remove unused method
* fix: sort expressions
* fix: lint errors
* fix: cleanup
2024-10-26 14:06:34 -04:00
Deluan
97c06aba1a
perf(server): add index for sort tags.
...
Improves search performance when searching with PreferSortTags=true
2024-10-19 20:46:54 -04:00
Kendall Garner
fa85e2a781
Use userId in player, other fixes ( #3182 )
...
* [bugfix] player: use userId, other fixes
This PR primarily resolves #1928 by switching the foreign key of `player` from `user.user_name` to `user.id`.
There are also a few other fixes/changes:
- For some bizarre reason, `ip_address` is never returned from `read`/`get`. Change the field to `ip`, which works. Somehow
- Update `players_test.go` mock to also check for user agent, replicating the actual code
- Update `player_repository.go` `isPermitted` to check user id. I don't know how this worked before...
- tests!
- a few places referred to `typ`, when it is really `userAgent`. Change the field names
* baseRequest -> selectPlayer
* remove comment
* update migration, make all of persistence foreign key enabled
* maybe don't forget to save the file first
2024-08-03 13:37:21 -04:00
Deluan
47378c6882
Remove unnecessary annotation table primary key
2024-06-29 11:45:41 -04:00
Deluan
abe5690018
Refactor string utilities into its own package str
2024-06-05 22:09:27 -04:00
Deluan
61903facdf
Revert isDBInitialized
2024-05-22 16:20:57 -04:00
Deluan
f88d3f82da
Replace panics with log.Fatals
2024-05-21 17:50:02 -04:00
Deluan
477bcaee58
Store MusicFolder as a library in DB
2024-05-12 21:37:42 -04:00
Deluan
f3bb022238
Add sampleRate to the DB
2024-05-11 17:57:45 -04:00
Deluan
a0290587b9
Fix migration package name mismatch
2024-05-08 19:54:48 -04:00
Deluan
180f1354fc
Make package name compatible with version installed by make setup
2020-10-03 20:13:47 -04:00
Deluan
47976e13b1
Create index to make sort by starred faster
2020-10-03 20:08:51 -04:00
Deluan
45e708f591
Loosen up constraints for email
. Fixes #362
2020-08-19 12:22:41 -04:00
Deluan
21b9f51b71
Rename migrations package, to match goose
generated migration files
2020-08-01 16:49:01 -04:00
Deluan
029290f304
fix: set default play_count to 0
...
IncPlayCount was not incrementing when the annotation already existed with play_count = null
2020-02-08 22:55:05 -05:00
Deluan
d9eb3e58cd
fix: only create db entities in first migration if they don't exist
2020-02-03 17:48:48 -05:00
Deluan
76ca8afc84
refactor: better migration description
2020-02-01 17:23:03 -05:00
Deluan
de1fea64bc
refactor: introduce GC, to delete old data
2020-02-01 17:23:03 -05:00
Deluan
d9f61a278c
refactor: some clean-up
2020-02-01 17:23:03 -05:00
Deluan
d389d40db1
feat: improve logs, remove config for disable authentication
2020-02-01 17:23:03 -05:00
Deluan
71c1844bca
refactor: new persistence, more SQL, less ORM
2020-02-01 17:23:03 -05:00