summaryrefslogtreecommitdiff
path: root/util/dump.sql
AgeCommit message (Collapse)AuthorFilesLines
2009-11-02SQL: Fixed another bug with the tags_vn_bayesian.spoiler calculationYorhel1-1/+1
2009-10-24Removed update_rev() function and monthly revcache cronYorhel1-25/+0
The changes.rev column should be correct in the first place, and in the (most likely) impossible condition that it isn't, the update_rev() function is more likely to make things worse.
2009-10-24Added Spawned <> Originated from producer relationYorhel1-1/+1
2009-10-21SQL: Send relgraph notify when needed for producer entriesYorhel1-0/+30
2009-10-21Added relation graphs for producersYorhel1-1/+3
TODO: - document the relations - emit a relgraph notify when needed
2009-10-21SQL: Renamed vn_graphs to relgraphs and synced dbgraph.plYorhel1-11/+7
As the same table can easily be used to store producer relation graphs as well.
2009-10-21SQL: Synced update_2.8.sql into dump.sqlYorhel1-5/+18
This doesn't mean the relations are final, though...
2009-10-18SQL: Fixed calculation of tags_vn_bayesian.spoilerYorhel1-1/+1
2009-10-17SQL: Converted releases_rev.type to an ENUM data typeYorhel1-4/+5
2009-10-12SQL: Converted changes.type to an ENUMYorhel1-4/+5
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-10Display number of unread posts in user menuYorhel1-0/+1
Instead of displaying the total number of threads. Posts are marked as read when the thread is opened.
2009-10-09Added producer role (developer/publisher) to DB and release editorYorhel1-0/+3
They aren't displayed on the site yet, though.
2009-10-09SQL: Converted releases_media.medium to an ENUM typeYorhel1-2/+3
2009-10-08Synchronised and updated dump.sql and dbgraph.plYorhel1-17/+14
Removed the 'SET default_with_oids', as the minimum required PostgreSQL version (8.3) has OIDS disables by default already. Also uncommented the CREATE LANGUAGE, plpgsql is a "trusted language" and as such doesn't need superuser priveleges to create anymore.
2009-09-18Fixed bug with excluding AVG(vote) < 0 VNs from tag pagesYorhel1-2/+3
This was *supposed* to be done in ce6d43aed955effe136f1ce3682828d2d43109cb
2009-08-12Added global user votes ignore listYorhel1-2/+7
2009-08-12Synchronised a NOT NULL constraint in dump.sql with the actual DBYorhel1-1/+1
threads_posts.edited allows NULL values.
2009-08-09Converted changes.added to timestamptzYorhel1-3/+3
That was the last one. I hope I haven't forgotten to update anything.
2009-08-08Converted tags.added to timestamptzYorhel1-1/+1
2009-08-08Converted users.registered to timestamptzYorhel1-1/+1
Just a few more to go...
2009-08-08Converted votes.date to timestamptz and use NOW() as defaultYorhel1-1/+1
2009-08-08Converted threads_posts.date and edited to timestamptzYorhel1-2/+2
Everything still seems to be working fine so far.
2009-08-08Converted wlists.added and rlists.added to timestamptzYorhel1-2/+2
I like how the rlists.added column isn't used anywhere in the code, makes the conversion a lot easier. :-)
2009-08-08Convert old category relations to tags and remove vn_categoriesYorhel1-9/+0
This will currently generate a 500 error for VN pages, because they still try to look something up in the vn_categories table. Will fix that soon. Obviously, this conversion script only works on the actual VNDB database, if you run your own VNDB you can safely ignore the INSERT error when executing update_2.6.sql.
2009-08-06Use timestamptz data type instead of timestampYorhel1-2/+2
It took me a while to figure out that the "timestamp with timezone" PostgreSQL type doesn't actually store the time zone, it simply stores and calculates on UTC, and only converts it to the connection time zone in the formatting stage before sending it to the SQL client. When working with date/times in PgSQL, the NOW() (and related) functions return a timestamp with time zone. Upon converting that to a timestamp without time zone type, the current timezone setting is used. Meaning that comparing a column of type timestamp without timezone to NOW() will only work if all data in the columns is stored in the same timezone as that of the current connection, which in turn means that changing this setting at any point will cause all data in timestamp without timezone columns to be incorrectly interpreted. I often praise PostgreSQL for their comprehensive documentation, but they could've pointed this out more clearly...
2009-08-05Multi::IRC: Reimplemented notifications using PgSQL LISTEN/NOTIFYYorhel1-0/+19
2009-07-31Use bytea data type to store session tokensYorhel1-1/+1
To be consistent with users.passwd - hashes are stored in binary. All conversion from/to hex is done in the DB layer.
2009-07-30Fixed syntax error in update_2.6.sql and removed leading spaces in dump.sqlYorhel1-2/+2
That syntax error was partly 3dB's fault, and partly my fault for changing too much in that merge, heh.
2009-07-30Merge branch 'auth' of git://3decibels.net/vndb into betaYorhel1-1/+11
Conflicts: util/dump.sql util/updates/update_2.6.sql Also updated ChangeLog and made some tiny style changes.
2009-07-29Changed sessions.expiration column to timestamp3dB1-2/+2
-- Updated SQL files to reflect column type change. -- Subroutine dbSessionAdd rewritten to accept an expiration timestap as an optional third argument.
2009-07-28Multiple bugfixes to authorization system & sql tweaks3dB1-1/+11
This commit is tested to work.
2009-07-23Implemented relgraph notify from PgSQL triggerYorhel1-0/+36
This finishes the new relation graph generator, as it'll now regenerate graphs as soon as is needed. This obsletes the VNDB::Util::Misc::vnCacheUpdate() function, this functionality is provided by triggers within PostgreSQL. The update_vncache(0) procedure is now significantly slower due to the trigger on the vn table. It'd be a good idea to rewrite this procedure by using triggers and conditional updates, to drastically lower the number of rows that need to be updated.
2009-07-19Removed DEFERRED property on most foreign key constraintsYorhel1-43/+41
Only allowing the deferred state on a select few foreign keys would detect problems in an earlier stage (rather than waiting for a commit to happen), and guarantees that some things are inserted before others, which in turn eases the writing of trigger functions.
2009-07-19Notify Multi::Image via PostgreSQL for new screenshotsYorhel1-0/+12
This finished the rewrite of Multi::Image and everything surrounding it.
2009-07-19Converted and renamed screenshots.status (int) to processed (bool)Yorhel1-1/+1
There were only two states, processed and unprocessed, so simply using a boolean column with correct naming is more clarifying.
2009-07-18Notify Multi::Image for new cover images via LISTEN/NOTIFYYorhel1-0/+13
Yay! Another weird shared-memory-command optimized away. And the image resizer reacts a lot faster now. Noticably, even.
2009-07-18Use PostgreSQL's LISTEN/NOTIFY to notify Multi::Anime for new animeYorhel1-0/+15
The notify is called from a trigger function, which is called on any UPDATE or INSERT INTO query of which the lastfetch column is NULL. This guarantees that anime info in the DB will always be updated, no matter how its inserted.
2009-07-18Automatically insert rows into anime table for new vn_anime.aid itemsYorhel1-0/+12
This is a lot less error-prone than doing it from Perl. <3 PostgreSQL
2009-07-18Modified definition of the anime tableYorhel1-7/+7
Removed most NOT NULL constraints, and converted lastfetch to a timestamp data type. The site has been updated to handle this, but Multi::Anime won't work.
2009-07-14Removed old and unused table/column definitions from dump.sqlYorhel1-11/+0
2009-07-08Keep track of users who requested tagsYorhel1-1/+3
2009-07-04Implemented support for multilingual releasesYorhel1-4/+12
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-05-23Animation fields for releasesYorhel1-1/+3
2009-05-23Added freeware and doujin information to releasesYorhel1-1/+3
TODO: - update d3 - filters on /r
2009-05-22Voiced field for releasesYorhel1-1/+2
TODO: filter on /r
2009-05-22Added resolution field to release entriesYorhel1-1/+2
TODO: - Update d3 - Add filter to /r
2009-05-09Don't consider VNs with AVG(vote) < 0 on tag pagesYorhel1-2/+2
The bayesian ranking algorithm isn't exactly meant to be used to differentiate between absolute values, so do a pre-check on AVG(vote) before considering a VN in the rating. I've also played around with using plain old averages as score, but I'd say the ordering is a lot better with the bayesian ranking, the displayed score is just slightly more confusing.
2009-03-28Fixed and re-organized tag<->vn calculationYorhel1-37/+33
Fixed major performance bug caused by referencing the wrong table, moved all intermediate views to tag_vn_calc() as temporary views (similar to update_vnpopularity()) and renamed tags_vn_stored to tags_vn_bayesian.
2009-03-22Fixed tiny SQL bugYorhel1-1/+1
2009-03-22Merge branch 'tagging' into betaYorhel1-5/+174
Conflicts: lib/VNDB/DB/Discussions.pm util/updates/update_2.3.sql