Skip to content
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

Support musicbrainz fields in search and distinct #43

Merged
merged 2 commits into from
May 17, 2020

Conversation

kingosticks
Copy link
Member

@kingosticks kingosticks commented Apr 20, 2020

A fix for #42. My first attempt at using SQLite, hope I did the migration correctly.

This requires mopidy/mopidy#1900

@kingosticks kingosticks self-assigned this Apr 20, 2020
@kingosticks kingosticks added the C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal label Apr 20, 2020
@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

Merging #43 into master will not change coverage.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #43   +/-   ##
=======================================
  Coverage   50.39%   50.39%           
=======================================
  Files           9        9           
  Lines         764      764           
=======================================
  Hits          385      385           
  Misses        379      379           
Impacted Files Coverage Δ
mopidy_local/schema.py 76.28% <50.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b38637...ed5ddfd. Read the comment docs.

@jodal jodal added this to the v3.2.0 milestone Apr 21, 2020
Copy link
Member

@jodal jodal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I don't have any experience with SQLite migrations either.

@tkem
Copy link
Member

tkem commented Apr 21, 2020

@kingosticks: I'm pretty impressed you could actually make some sense out of this mess ;-)
However, I think you should also update sql/schema.sql, too, for fresh installs.
AFAICS, only sql/upgrade-v6.sql has been changed. So with a fresh install, the v5 schema will be created with schema.sql, and then the upgrade-v6.sql script will be run. I always thought it would be more clear if schema.sql contains the current schema. Just easier by looking at a single file to see what's going on.
But it's debatable, since that means some code duplication in the upgrade scripts.

Copy link
Member

@tkem tkem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks fine, but I'd also suggest updating schema.sql accordingly.

mopidy_local/sql/upgrade-v6.sql Outdated Show resolved Hide resolved
mopidy_local/sql/upgrade-v6.sql Outdated Show resolved Hide resolved
mopidy_local/sql/upgrade-v6.sql Outdated Show resolved Hide resolved
mopidy_local/sql/upgrade-v6.sql Outdated Show resolved Hide resolved
mopidy_local/sql/upgrade-v6.sql Outdated Show resolved Hide resolved
@tkem
Copy link
Member

tkem commented Apr 21, 2020

BTW, since v5 was the first sqlite schema version used in mopidy-local, the older upgrade scripts could probably be dropped. I guess I should have done this when merging mopidy-local-sqlite in the first place, and maybe reset the schema version to v1.

@kingosticks
Copy link
Member Author

Ahh, I didn't notice that sql/schema.sql actually matched the latest schema (the version number should have been a giveaway). That all makes sense. I've also made those suggested changes.

@kingosticks kingosticks merged commit 00b8340 into mopidy:master May 17, 2020
@kingosticks kingosticks deleted the feature/more-search-fields branch May 17, 2020 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants