summaryrefslogtreecommitdiff
path: root/util/sql
AgeCommit message (Collapse)AuthorFilesLines
2015-01-28sql: Merge staff changes into /util/sql/ and rename staff.sql2.24Yorhel3-69/+64
So that the /util/sql/ files are in sync with the actual DB again.
2015-01-28Merge branch 'staff' into masterYorhel1-1/+1
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Handler/VNPage.pm
2015-01-17staff: Fix search to ignore spaces in Japanese namesmorkt1-0/+1
2015-01-12staff: Add notifications for staff edits/deletesYorhel2-2/+12
2015-01-12staff: Remove some remnants of the staff imagesYorhel2-4/+3
2015-01-04staff: Add some link fields and guidelinesmorkt2-4/+7
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt1-0/+2
2014-12-28More progress on the staff + cast DBmorkt2-9/+12
2014-12-24Further progress on the staff databasemorkt1-1/+2
- Moves staff<->vn linking form to the main VN edit form - Fixes a bug with linking staff aliases to VNs - Adds staff changes to the VN revisions - And some misc. improvements
2014-12-22Initial implementation of a staff/seiyuu databasemorkt2-2/+111
2014-12-02Completely drop l_vnn column from VN infoYorhel2-3/+2
Used to link to a visual-novels.net review or something. Links have been hidden and dead since ages. No need to keep the column around.
2014-10-15Use scrypt for new password hashesYorhel1-1/+7
I increased the N parameter to approximate about 500ms to generate the hash. This is quite a paranoid setting for a website, but login attempts are throttled so there's not much of a DoS factor. (Alright, password changing feature isn't throttled so the DoS factor still exists. But really, there's some pages with longer page generation times anyway.) I did lower the size of the salt a bit (Crypt::ScryptKDF uses 256 bits by default), because 64 bits of randomness should have low enough chance of collision with only ~100k users (even with a million users, seriously).
2014-10-15SQL: Merge users.(passwd|salt) in one column + document valuesYorhel1-1/+9
It doesn't make a whole lot to separate the hashed password and the salt from each other, you need both to do anything with them, and from the database perspective they're both completely opaque strings only usable for direct comparison with other hashed strings. This change is mostly as preparation for switching to a proper key derivation function (sha256 isn't...) and to add support for longer and/or binary salt. Because the passwd field now needs to be interpreted in Perl, it's being passed around as a binary string rather than a hex-encoded value. API login is broken in this commit. I'll get to that.
2014-10-13SQL: Use enum to represent platformsYorhel3-4/+6
I believe I didn't do this conversion earlier (back when I converted the language types) because PostgreSQL didn't support dynamically adding new values to an existing enum back then, and modifying an enum was a huge pain. Recent versions do support this, so there's no reason to keep it as a string. ...I just felt like adding some churn to the code base.
2014-10-11SQL: Convert login_throttle.timeout to a timestamptzYorhel1-1/+1
Easier to work with in custom queries.
2014-09-15Change normalization factor in popularity ranking calculationYorhel1-1/+1
Suggested by Hinoe, quoting his reasoning: In popularity rankings, change the normalization from "sqrt(LowerVoteCount)" == "LowerVoteCount^0.5" to something that grows somewhat more slowly. Details: Natural logarithm itself (ln(LowerVoteCount+1)) is too slow; at the current VN count (15403), it returns 9.64; however, sqrt(15402) is just above 124.1, which I feel is already too high. After experimenting with the exponents a bit, I decided that the best point likely lies between 0.3, which returns a bit above 18.0, and 0.4, which returns a bit above 47.3. Thus, I suggest that the new function be LowerVoteCount^0.36788; the exponent is a 5-digit approximation of e^-1, just because it's a nice number in the specified area and works well, returning circa 34.7.
2014-08-29Throttle failed login attempts (10/day)Yorhel1-0/+6
2014-08-29Sync language type util/sql/all.sql with recent updateYorhel1-1/+1
2013-09-14Added Arabic and Hebrew languagesYorhel1-1/+1
2013-01-05Screenshot uploader: Load stuff synchronously + removed processing flagYorhel1-1/+0
All the async stuff isn't necessary now that images are processed synchronously.
2013-01-05Don't use Multi for processing screenshotsYorhel2-9/+0
TODO: Get rid of the 'processing' flag and all the async loading of screenshot data in the screenshot uploader.
2013-01-05Don't use Multi for processing character imagesYorhel2-9/+0
2013-01-05Don't use Multi for processing VN cover imagesYorhel2-8/+0
I used to do this to avoid loading Image::Magick in each TUWF process, decreasing memory usage, and lowering the blocking time by avoiding too much processing. Memory isn't much of a problem nowadays, and processing images is fast enough, too, so this complexity isn't necessary anymore. (Character images and screenshots pending)
2012-07-24Add wishlist / VN list status options to VN list browserSpaceRanger1-1/+1
2012-06-05schema.sql: Fix order of some columns + remove useless DEFAULT NULLYorhel1-4/+4
The ordering unfortunately matters for some tables, due to the edit_* stored procedures relying on it. :-(
2012-06-04all.sql: Fix creation of the deleted and multi accountsYorhel1-2/+2
2012-06-04schema.sql: Fix creation of anime tableYorhel1-2/+2
2012-03-27Added Indonesian languageYorhel1-1/+1
2012-01-09Added language for UkrainianYorhel1-1/+1
And added an update_2.23.sql file which now also includes the previously added indices. Currently, this update file can be run as often as you want, it doesn't make any noticable changes when you run it on a database that has already been updated. (i.e. I can update the main site without a new release)
2012-01-07SQL: Added two indicesYorhel1-0/+2
This brings the average page generation time for VN pages down from ~170ms to ~90ms (when measured over a period of a few hours). I haven't put this in an update script, if you want to take advantage of these indices make sure to manually add them yourself.
2011-12-29Maintain VN search cache for hidden entries as wellYorhel2-11/+6
Required in order to search for hidden entries (obviously :P)
2011-08-23Added email confirmation to registration processYorhel1-1/+2
2011-05-01Bugfix in update_stats_cache() resulting in a 500Yorhel1-1/+1
2011-04-30Replaced user ranks with a permission systemYorhel1-1/+1
This is far more flexible.
2011-04-29affiliates: +data column, hide hidden links, better browser, Multi fixesYorhel1-1/+2
2011-04-09affiliates: Added very basic support for sponsored "buy now" linksYorhel1-0/+15
2011-04-08Added char/tag/trait stats to database statistics boxYorhel2-3/+22
2011-04-08Generate dbedit/dbdel notifications on character editsYorhel2-17/+25
2011-03-19chardb: Synchronized DB changes with util/sql/* and dbgraph.plYorhel2-3/+103
2011-03-15chardb: Added main char field + editingYorhel1-2/+2
The field isn't used yet.
2011-02-22chardb: +char<->vn linking, +vn display on char pagesYorhel1-1/+5
2011-02-22chardb: +image quality, -other blood type, typo fix, +gender iconsYorhel1-2/+2
2011-02-21chardb: gender field + blood type/gender field compacting on char pageYorhel1-2/+2
2011-02-21chardb: char-by-trait lookup + trait usage count + tag-code sharingYorhel1-1/+35
I'll have to optimize the updating of traits_chars as soon as I have some data to test with. Also renamed tags.c_vns to c_items, to have it share the same name as traits.c_items. This makes it a lot easier to re-use code for both tags and traits, such as what I did with dbTagTree/dbTraitTree -> dbTTTree and the childtags() and parenttags() functions.
2011-02-20chardb: Added "group" property to traitsYorhel1-1/+5
It's more like a cache, and has some unintuitive problems when a trait is applied to multiple top-level traits. But this'll do the trick anyway.
2011-02-19chardb: Added blood type + misc. fixes and improvementsYorhel1-2/+2
2011-02-18chardb: Implemented BWH/height/weight fieldsYorhel1-4/+2
2011-02-16chardb: Added image to character entriesYorhel1-0/+7
2011-02-16chardb: Added character add/edit form + misc. fixesYorhel1-5/+5
2011-02-15chardb: Added char entry tables and updated the basic revision frameworkYorhel1-0/+44
The Perl code and SQL-revisioning code only handles the name, original, alias and desc fields at the moment. There is a basic /i+ and /i+.+ page for testing, which should have all the functionality required for the revisioning framework.