Age | Commit message (Collapse) | Author | Files | Lines |
|
Been wanting to do this for a while...
I've kept util/sql as a symlink for compatibility with the devdump, old
update scripts and other code I may have forgotten. I'll remove it
later.
|
|
https://vndb.org/t2520.377
|
|
sampling
|
|
|
|
Lots of TODO's left to work on, but you have to start somewhere.
I've bumped the Docker image version because this change requires TUWF
commit 74aad378d49592df4359ea8a9f6f36d4a0013c04 (Elm decoder for structs
with more than 8 fields)
|
|
Ought to simplify the image flagging UI.
|
|
In preparation for an image flagging feature. This replaces the
'screenshots' table.
I played around with various implementations of a primary key for the
images table; A single integer encoding both the type and id is most
efficient, but kind of ugly to work with. Two separate columns are also
ugly and force the creation of a separate 'image_type' column on all
referencing tables. The current composite type isn't all that much
better, but at least it makes it easy to keep treating the image id as a
single entity. Old VNDB::* code still treats it as an integer with
different namespaces, new VNWeb::* code treats it as a proper composite
type.
|
|
My policy is to not dump cached tables and columns that can be derived
from other included data, but these stats aren't really a cache from the
perspective of a DB dump user, since they're based on votes that are not
available to the public.
|
|
This fixes the issue of tag votes getting deleted when a user account is
deleted, despite these votes being part of the kept "database
contributions" mentioned in the privacy policy.
|
|
Currently only displayed in the tag link browser and the tag editing
form, but I'm hoping to display these on the VN page as well (on hover
or something, not sure about the UI).
|
|
Strips about 500ms off the page generation time for d11. The previous
in-memory cache kinda worked, too, but it still often happens that the
cache is empty.
This cache also applies for docs_hist, so browsing through earlier
revisions is now faster as well.
|
|
|
|
|
|
|
|
Ended up exporting the 'users.ign_votes' column as well, as that's both
easier and (potentially) more useful than not exporting ignored votes in
the first place.
|
|
This is just a simple backwards-compatible port, proper integration
should allow one to filter on individual labels. The "On my VN list"
filter now works slightly differently in that it considers *everything*
in ulist_vns to be on the users' VN list, including votes and wishlist.
I've removed the option to display a "Wishlist" column. The wishlist
works rather differently now, maybe this should instead just display all
assigned labels - but that would consume quite a bit of space. :(
|
|
Old VNDB::* code still uses that preference in a few places, that needs
to be fixed.
|
|
That'd make it much easier to find fake accounts.
|
|
This adds the users.c_vns and c_wish columns and a function to update
the cache.
Unlike my previous cache update approaches, I did not use SQL triggers
here, as that seemed more complex and less efficient than updating the
cache manually. That's not to say that I'm happy with the current
approach, but meh...
The cache update function is not automatically run for all users, but
that could be added to Multi::Maintenance if it turns out that the
cached values will not be updated properly in some cases.
|
|
|
|
I did not reimplement the 'poll_recast' and 'poll_preview' settings,
these actions are now always permitted.
Updated CSS a little bit to highlight the linked post and fix the double
border at the bottom.
The nice thing about the sql_visible_threads() function I wrote earlier
is that is can also be used for access control on a single thread. More
code re-use. \o/
|
|
|
|
|
|
|
|
They don't do anything yet.
|
|
Most importantly, downvoted parent tags are now still included for
searching as per https://vndb.org/t12750 - in particular, a downvoted
tag is considered to be exactly the same thing as a tag with no votes at
all.
Also made a few other adjustments:
- Removed the "ignore child tags/traits if parent has its own value"
rule. This was done because the 'spoiler' rating would get
inherited using the average, but that should just have been the
minimum (i.e. if a single child tag is not a spoiler, then neither is
the parent). https://vndb.org/t10082
- The score of a parent tag is now avg(avg(votes_on_child_tags)) rather
than avg(votes_on_child_tags), i.e. tags with more votes don't have
more weight than tags with fewer votes. I don't think vote counts
really matter in determining the parent score.
- Deleted VNs now don't count towards tag statistics (this is consistent
with traits).
- Performance improvements: Smaller indices and more clever querying.
|
|
This ensures that the email address linked to a user is always valid and
actually belong(s|ed) to that user.
|
|
This improves the password reset workflow a bit.
The users.passwd field is now no longer used for reset tokens, meaning
that the current password isn't affected until the user actually clicks
the link and changes it.
It is now also possible to have multiple active password reset tokens,
in case one of the emails got lost. All existing tokens are invalidated
when the user finally changes their password.
Tokens are now valid for at most 1 week instead of indefinitely.
|
|
This will be helpful when adding other types of sessions with different
expiration.
|
|
And for those who (like me) already applied update_20191003.sql, here's
a partial fix:
alter table users alter column spoilers drop default;
alter table users alter column spoilers type smallint using (case when spoilers then 1 else 0 end);
alter table users alter column spoilers set default 0;
But you'll still need to import the old preference for users who had
spoilers=2, because those will have been lost.
|
|
This bloats the users table a little bit, but that's fine. The main
advantage of this change is that we now have a proper schema for user
preferences, rather than the schemaless key-value mess we had before.
This commit also splits the 'tags_cat' preference up into tags_cont,
tags_ero and tags_tech bools, as that's more compact to store and easier
to work with.
This commit also changes the 'notify_nodbedit' preference to
'notify_dbedit' with inverted meaning. The reason the value was negated
in the first place was because the old schemaless approach did not
support positive defaults.
|
|
Sorry for re-using update_20190923.sql, but I'm not sure anyone even
uses those scripts. For documentation purposes it's neat to have similar
things in a short time window combined, anyway.
|
|
|
|
https://vndb.org/t12897.6
|
|
I always avoided using the VNDB::* schema for non-web related utility
modules, but thats pretty silly (especially as I'm slowly trying to move
away from the old VNDB::* web code).
|
|
Has the inverted meaning. Keeping track of how long we've been unable to
find a certain shop link is useful in weeding out temporary
unavailability when querying for dead links.
|
|
|
|
|
|
The fields are still there in order to keep the edit history somewhat
sensible, but we don't need this additional code.
|
|
To handle https://vndb.org/t12755.37
|
|
|
|
|
|
The current affiliate links format doesn't display as much information
as before but it's also a lot less messy.
|
|
Most of this code isn't new - there's been a hidden 'Affiliates.pm'
module for a while. This just consolidates the code with the other shops
and opens up the code. The API endpoint is hidden. :)
|
|
|
|
|
|
|
|
|
|
|
|
|