Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
|
|
|
|
TODO:
- document the relations
- emit a relgraph notify when needed
|
|
As the same table can easily be used to store producer relation graphs
as well.
|
|
This doesn't mean the relations are final, though...
|
|
|
|
|
|
This is a very important column in a very important table, I hope I
didn't forget to update a piece of code somewhere...
|
|
Instead of displaying the total number of threads. Posts are marked as
read when the thread is opened.
|
|
They aren't displayed on the site yet, though.
|
|
|
|
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.
|
|
This was *supposed* to be done in
ce6d43aed955effe136f1ce3682828d2d43109cb
|
|
|
|
threads_posts.edited allows NULL values.
|
|
That was the last one. I hope I haven't forgotten to update anything.
|
|
|
|
Just a few more to go...
|
|
|
|
Everything still seems to be working fine so far.
|
|
I like how the rlists.added column isn't used anywhere in the code,
makes the conversion a lot easier. :-)
|
|
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.
|
|
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...
|
|
|
|
To be consistent with users.passwd - hashes are stored in binary. All
conversion from/to hex is done in the DB layer.
|
|
That syntax error was partly 3dB's fault, and partly my fault for
changing too much in that merge, heh.
|
|
Conflicts:
util/dump.sql
util/updates/update_2.6.sql
Also updated ChangeLog and made some tiny style changes.
|
|
-- Updated SQL files to reflect column type change.
-- Subroutine dbSessionAdd rewritten to accept an expiration
timestap as an optional third argument.
|
|
This commit is tested to work.
|
|
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.
|
|
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.
|
|
This finished the rewrite of Multi::Image and everything surrounding it.
|
|
There were only two states, processed and unprocessed, so simply
using a boolean column with correct naming is more clarifying.
|
|
Yay! Another weird shared-memory-command optimized away. And the image
resizer reacts a lot faster now. Noticably, even.
|
|
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.
|
|
This is a lot less error-prone than doing it from Perl.
<3 PostgreSQL
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
TODO:
- update d3
- filters on /r
|
|
TODO: filter on /r
|
|
TODO:
- Update d3
- Add filter to /r
|
|
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.
|
|
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.
|
|
|
|
Conflicts:
lib/VNDB/DB/Discussions.pm
util/updates/update_2.3.sql
|