summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB
AgeCommit message (Collapse)AuthorFilesLines
2011-01-07Don't update the 'date' when changing a VN voteYorhel1-1/+1
Reverted back to the old behaviour.
2011-01-03Bugfix: Secondary order by title or username on vote listingsYorhel1-1/+1
2011-01-02Bugfix: Don't show NSFW screenshots on homepage with filtersYorhel1-1/+1
2011-01-01Also apply permanent VN filters to the random screenshots on /Yorhel1-3/+22
2010-12-23Converted the notify_announce and notify_dbedit preferencesYorhel1-3/+3
And renamed notify_dbedit to notify_nodbedit, since the default is to provide a notify on a database edit. Also fixed a few bugs along the way.
2010-12-23Converted the show_list pref. to users_prefs and inverted the valueYorhel2-5/+9
In the users_prefs table, the default value should evaluate to 'false' in Perl, so show_list had to be inverted to hide_list.
2010-12-23Converted the show_nsfw preference to use the users_prefs tableYorhel1-2/+2
2010-12-23Added users_prefs table and removed users.(skin|customcss)Yorhel1-4/+27
Will convert the other preferences later.
2010-12-21Pass VN tag filters by ID rather than nameYorhel2-10/+16
This makes the UI slightly uglier and less intuitive. I'll see if I can find a way around that. This update is required for the permanent browsing filters to be fast and reliable.
2010-12-21Added vnlists.status filter to /u+/listYorhel1-0/+1
Can only filter on one option. If there are more things to filter on it would make sense to use the filter selector, but for now this will do.
2010-12-21Added notes field to the user VN listYorhel1-7/+10
The interface to set this could be more dynamic, since it'll be a lot of work to set different notes for each VN. But oh well, let's first see how many people will use this feature.
2010-12-20Update the votes.date column when changing a voteYorhel1-1/+1
2010-12-20Added ability to batch-edit votes to /u+/votesYorhel1-3/+5
2010-12-19ULists::votelist: Added first character selectionYorhel1-0/+6
2010-12-19RFC-01: Code/DB cleanup and renamed some stuff for consistencyYorhel1-4/+4
2010-12-19RFC-01: Updated and improved /u+/listYorhel1-46/+70
I'm sure I broke all vnlist/rlist-related features on the rest of the site since I modified the DB abstractions. But these will all have to be updated/rewritten anyway.
2010-12-17Don't allow NULL for rr.minage and use -1 for unknownYorhel1-10/+1
This can be seen as a partial revert of 0a4f97f0186d6941a4cab2e3bd05201f1fed1441. I used to think using NULL for special values is more "correct" in database terms. But in the end I guess I should be aiming for whatever solution is easier. Both are "correct" in a sense anyway.
2010-12-13Added advanced tag link browserYorhel1-4/+34
Still need to add some links to the browser to parts of the site.
2010-12-10Keep track of last modification date for tag<->vn linksYorhel1-4/+27
Currently unused, but this will be useful in the future. dbTagLinkEdit() is now a lot more complex, since the last modification date will be incorrect for unmodified tag links when we simply delete and re-insert all related links like the old function did.
2010-12-10Added vote listings for VNs and users (/[uv]+/votes)Yorhel1-3/+12
2010-11-28Release filter selector: Added original language filterYorhel1-2/+4
I'm surprised I haven't been able to find a combination of filters that would generate an SQL query that would run more than 300ms or so. PostgreSQL is amazing!
2010-11-28VN Filter Selector: Added "original language" filterYorhel1-1/+3
The original language is the language of the first release of the VN, and is cached in vn.c_olang. (Geez, the vn table has more caching columns than actual information >.>)
2010-11-27VN Filter Selector: Added "has anime" filterYorhel1-1/+3
Also requested several times before.
2010-11-27VN Filter Selector: Added length field filterYorhel1-1/+3
Has been requested quite often, now finally implemented.
2010-11-27Replaced old VN advanced options with the new filter selection systemYorhel1-5/+5
Had to fix some bugs here and there and add some new functionality to the abstractions at some places, but it appears to be working now. There are still a few TODOs left, I'll get to those in a bit.
2010-11-26Added voiced field release filterYorhel1-1/+2
The release filters are now pretty much complete. Save, perhaps, for some improved styling and grouping in the filter selector; but I'm too lazy for that at the moment.
2010-11-26Added animation field release filterYorhel1-2/+4
Surprisingly enough, the SQL queries are still quite fast even when matching on the animation columns. And thanks to the new filter system, adding this filter was incredibly easy.
2010-11-21Implemented the server side of the new release filter selectorYorhel1-27/+31
There's no validation of the filter string yet, and somehow I don't feel like adding that; it's a lot of code and there's nothing to protect - the values are inserted using parameters into a SELECT query, the worst thing that could happen is the user receiving a 500. Also, I've started using the perl '//=' operator, which was added in 5.10. This removes support for older perls.
2010-11-14SQL: Added ON DELETE clause to all foreign keys referencing users (id)Yorhel1-15/+1
This makes deleting user accounts less error prone. It also seems I forgot to git add update_2.14.sql in an earlier commit, sorry about that.
2010-11-11DB::Releases: Removed extra ON clause from JOIN releasesYorhel1-1/+1
I added this clause to slightly speed up the SQL query at producer pages, but it turns out to slow down release search queries by a factor 100.
2010-11-11Producer release listing: added dev/pub info and expand/collapse linkYorhel1-0/+1
It's an awesome feature now. :-)
2010-11-11Display releases grouped by VNs on producer pagesYorhel2-27/+5
A nice expanded view. It also happens to be faster than the old view in terms of SQL queries. (In most cases at least) Can be improved a little more by: - Adding an 'expand/collapse' feature to list only the VNs - Adding a column indicating the role of the producer (dev/pub)
2010-11-10Started on adding an "official" flag to vn<->vn relationsYorhel1-5/+6
This is the first part. The flag is stored in the database, can be edited through the usual VN edit form, and is displayed in the diff viewer. Things to do to make this feature fully functional: - display "official" status on VN page at the relation listing - update relation graphs to display unofficial relations differently - update guidelines
2010-11-07DB::Misc: Optimized dbRevisionGet()Yorhel1-17/+19
The code is a bit more complicated now, and it's not a lot faster, but at least this helps a bit.
2010-11-07Optimized random VN fetching queryYorhel1-1/+7
Similar to ab64b573846da39622b8d430b079d7e8806a35d3, but with a few more constraints as dbVNGet() is a more generic function. This and the other commit greatly improve the page generation time of the homepage. From ~250ms to ~110ms in my tests.
2010-11-07Optimized random screenshot fetching queryYorhel1-8/+12
By rewriting the query and using the trick documented here: http://blog.rhodiumtoad.org.uk/2009/03/08/selecting-random-rows-from-a-table/ Can be further optimized by putting an index on vn_screenshots.scr
2010-11-06Bugfix: delete/update all references when deleting a userYorhel1-0/+5
Really need a cleaner solution for that. PostgreSQL actually provides a better solution, need to change to that.
2010-11-03Merge branch 'master' into betaYorhel1-2/+2
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Func.pm
2010-11-02Multi::Image: Abstracted image dimension calculation into VNDBUtilYorhel1-1/+2
Which may also be useful for other scripts.
2010-10-31Remove duplicate votes when merging tags (fixes a 500)Yorhel1-0/+4
2010-03-13Improved VN searchYorhel1-28/+5
This adds a new column to the vn table: c_search, which holds the normalized titles for speedy search results using LIKE. Also split some functions from VNDB::Func that didn't require YAWF into a VNDBUtil module, so Multi can also make use of them. The normalization functions are the same for Multi and VNDB, after all. The API and Multi::IRC still use the old search, these should be updated as well.
2010-03-09DB::ULists: Greatly improved query performance for VN list with 'hide voted'Yorhel1-2/+2
Crawlers would often find such pages, and the query would often take more than a second to finish, in some extreme cases even 10 seconds. This fix converts an intermediate result into an array, forcing the query planner to evaluate the subquery first, resulting in a far more optimal query plan.
2010-02-19Two more GTIN-related fixesYorhel1-1/+1
1. Don't try to normalize the GTIN code in the releases form when it's 0 2. Don't try to gtintype() *every* number in the search
2010-02-05Merge branch 'master' into betaYorhel1-2/+2
Conflicts: data/lang.txt
2010-02-05Notifications: Added 'announce' notificationYorhel1-2/+2
This one is also configurable, but mainly because I want to avoid generating several thousands of notifications for a single action...
2010-02-05Notifications: Added 'dbedit' notificationYorhel1-2/+2
And added a settings window where you can disable this notification, which is something you really want to do if you're an active contributor...
2010-02-02SQL: Converted language columns to an ENUM typeYorhel2-4/+4
And changed vn.c_languages to an array type while I was at it. This required some changes in the Perl code, and I found a bug in DBD::Pg while I was at it: https://rt.cpan.org/Ticket/Display.html?id=54224 Luckily, there's an easy workaround for that.
2010-02-01Cache the title and userid of the notificationsYorhel1-9/+2
These aren't likely to change anyway, and things will become less easy to display when other types of notifications are added.
2010-01-26SQL: Replaced sessions.expiration with sessions.addedYorhel1-5/+2
An expiration date doesn't make much sense if it's both not used and if it can't be configured by the user, so just make this a timestamp to indicate when the session has been added, which, while still not really used, is more valuable.
2010-01-26Keep track of when a session has last been usedYorhel1-1/+9
If we're going to automatically remove older sessions, it would make more sense to remove unused sessions, rather than old sessions that are still in use. But we first need to keep track of when a session has last been used to do so...