summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Releases.pm
AgeCommit message (Collapse)AuthorFilesLines
2018-10-25DB::Releases: Don't return duplicate releases in dbReleaseGet(vid => [...])Yorhel1-2/+1
In the special case where the releases of multiple VNs are requested, and those VNs have releases in common, dbReleaseGet() would return those releases multiple times. Using a JOIN in order to filter rows isn't safe if the join condition isn't unique - so use an "id IN(SELECT ..)" filter instead. (I found this while editing c15068 and noticing that some releases were listed twice in the edit form. Editing that entry without manually removing those duplicates would trigger an internal server error due to duplicate relations)
2018-05-25Add uncensored flag to release entriesYorhel1-6/+7
As discussed in https://vndb.org/t10665
2016-11-03List deleted releases when adding a new releaseYorhel1-5/+6
2015-12-31DB::Releases: Don't match non-patch fields for patch releasesYorhel1-6/+6
Fixes https://vndb.org/t950.210
2015-12-30Add release filters to VN browserYorhel1-15/+24
2015-10-21SQL: Fix editing + func.sql + triggers.sql + autocreate editing funcsYorhel1-11/+11
This changes quite a bit to the way the editing functions work. Because these functions are very repetitive and it's easy to keep things out of sync, I created a script to generate them automatically. I had to rename a few function and table names for consistency to make this work. Since database entries don't have a 'latest' column anymore, and since the order in which tables are updated doesn't have to be fixed, I dropped many of the SQL triggers and replaced them with a edit_committed() function which is called from edit_*_commit() and checks for stuff to be done. Don't forget to run 'make' before importing the update script.
2015-10-17SQL: Fix all browsing queries to use the new schemaYorhel1-76/+100
This basically makes VNDB browsable again, but editing entries is still broken. I split off the get-old-revision functionality from the db*Get() methods into db*GetRev(). This split makes sense even with the old SQL schema: db*Get() had to special-case some joins/filters when fetching an older revision, and none of the other filters would work in that case. This split does cause some code duplication in that all db*GetRev() methods look very much alike, and that the columns they fetch is almost identical to the db*Get() methods. Not sure yet how to avoid the duplication elegantly. I didn't do a whole lot of query optimization yet (most issues require extra indices, I'll investigate later which indices will make a big difference), but I did fix some low hanging fruit whenever I encountered something. I don't think I've worsened anything, performance-wise.
2014-03-14DB::Releases: Fix mixing AND/OR expressions in platform/media filtersYorhel1-4/+4
Fixes http://vndb.org/t5136
2013-01-21Added "unknown medium" release filterYorhel1-2/+5
2013-01-21Added "unknown platform" release filterYorhel1-2/+5
2012-07-28DB::Releases: Use id as secondary order when sorting on dateYorhel1-1/+1
This is under the assumption that earlier releases are added earlier, even when they're released on the same date. (E.g. in the case of v9678)
2012-07-13Various improvements with the releases tableSpaceRanger1-4/+10
2011-05-17Added secondary ordering on title on releases listing on VN pageYorhel1-1/+1
2011-04-09affiliates: Added very basic support for sponsored "buy now" linksYorhel1-1/+1
2011-03-14chardb: Added Char<->VN linking edit interfaceYorhel1-1/+1
Still somewhat quircky, but it works.
2011-01-07DB::Releases: Inverted 'unreleased' option to dbReleaseGet()Yorhel1-2/+2
Makes more sense this way.
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-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-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-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 pagesYorhel1-2/+4
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-01-24Versioned the deleting and locking of database entriesYorhel1-1/+1
This is implemented by adding ihid (item hidden) and ilock (item locked) columns to the changes table, The (vn|release|producer).(hidden|locked) columns now work as a cache, refering to the changes.(ihid|ilock) columns with changes.id = (vn|release|producer).latest. The cached columns are updated automatically each time a new revision is inserted. This is a pretty large change, bugs are quite likely.
2010-01-01SQL: Revision insertion abstraction for release entriesYorhel1-40/+40
Also added a little sanity checking on the edit_(vn|release) table, and added a default value for releases_rev.released.
2009-12-05Merged db[VN|Producer|Release][Edit|Add] into dbItemEdit and dbItemAddYorhel1-23/+3
And also changed the way the item_table.latest column was updated: it is now only updated after the revision insert has completed, making it easier to write trigger functions in SQL.
2009-11-27DB: Abstracted all ORDER BY clauses in the DB abstraction layerYorhel1-3/+9
The ORDER BY was previously specified using an 'order' argument, which would then be directly inserted into the query. The new method is the same as what I used for the public API: two 'sort' and 'reverse' arguments. This should be less error-prone and more readable. This changes quite a lot of code, so I hope I haven't forgotten to update something along the way.
2009-11-14SQL/L10N: Allow NULL for releases_rev.minage and make the values translatableYorhel1-1/+1
2009-10-12SQL: Converted changes.type to an ENUMYorhel1-2/+2
This is a very important column in a very important table, I hope I didn't forget to update a piece of code somewhere...
2009-10-09Added producer role (developer/publisher) to DB and release editorYorhel1-4/+4
They aren't displayed on the site yet, though.
2009-10-09SQL: Converted releases_media.medium to an ENUM typeYorhel1-1/+1
2009-08-09Converted changes.added to timestamptzYorhel1-1/+2
That was the last one. I hope I haven't forgotten to update anything.
2009-07-04Implemented support for multilingual releasesYorhel1-6/+20
The 'language' column in releases_rev has been replaced with a releases_lang table. As this is quite a big change, there may still be bugs floating around somewhere.
2009-06-10Properly import VNDB::Func::gtintype in VNDB::DB::ReleasesYorhel1-0/+1
This fixes an internal server error when searching on a number in the release browser.
2009-05-30Freeware and doujin filters on /rYorhel1-11/+9
2009-05-30Screen resolution filter on /rYorhel1-1/+3
2009-05-24Don't perform search subquery when there are no keywords to search onYorhel1-1/+1
2009-05-24Allow search queries with only one characterYorhel1-1/+0
2009-05-23Animation fields for releasesYorhel1-3/+3
2009-05-23Added freeware and doujin information to releasesYorhel1-3/+5
TODO: - update d3 - filters on /r
2009-05-22Voiced field for releasesYorhel1-3/+3
TODO: filter on /r
2009-05-22Added resolution field to release entriesYorhel1-3/+3
TODO: - Update d3 - Add filter to /r
2009-05-22Added medium filter on /rYorhel1-1/+3
2009-05-10Release browser: Added date filterYorhel1-1/+1
2009-05-10Added search field on release browserYorhel1-3/+17
2009-05-10Advanced filtering for the release browserYorhel1-1/+12
2009-05-09Started on a release browserYorhel1-1/+3
This browser is still -very- basic, more filters and options will be added later.
2009-02-21Small performance improvements for dbReleaseGet()Yorhel1-3/+4
Using the same method as 203509ffd8fc2fbbd76129d701a6c20110f6050d
2009-02-12Catalog number field to release entriesYorhel1-3/+4