path: root/util/
AgeCommit message (Collapse)AuthorFilesLines
2019-12-24ulist: Export new lists in, unexport old listsYorhel1-23/+30
Ended up exporting the 'users.ign_votes' column as well, as that's both easier and (potentially) more useful than not exporting ignored votes in the first place. Do an explicit rollback before disconnecting the DBYorhel1-0/+1
Fixes a (harmless) warning: Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=vndb at util/ line 247. Ensure consistent exportsYorhel1-1/+2
Today's export had a little inconsistency caused by a database update while the export script was running.
2019-10-03SQL: Get rid of the users_prefs table, store preferences in users tableYorhel1-7/+6
This bloats the users table a little bit, but that's fine. The main advantage of this change is that we now have a proper schema for user preferences, rather than the schemaless key-value mess we had before. This commit also splits the 'tags_cat' preference up into tags_cont, tags_ero and tags_tech bools, as that's more compact to store and easier to work with. This commit also changes the 'notify_nodbedit' preference to 'notify_dbedit' with inverted meaning. The reason the value was negated in the first place was because the old schemaless approach did not support positive defaults.
2019-09-17Rename VNDBSchema to VNDB::Schema and let it figure out the root path itselfYorhel1-4/+4
I always avoided using the VNDB::* schema for non-web related utility modules, but thats pretty silly (especially as I'm slowly trying to move away from the old VNDB::* web code). Make sure to include chars_vns relations with rid = NULLYorhel1-1/+1
2019-08-15Minor util/sql/ reorganization + Make devdump more robustYorhel1-1/+1
I never really liked the hack that had to use to temporarily disable triggers and references. This new importer first imports all schema-related things, then the data, then the functions and table attributes - like an actual database dump. This restructuring should also make it (slightly) easier to import the "near-complete" database dump, but that's still going to involve a fair amount of scripting. This also fixes #22 - the script now asks whether to import a 'dump.sql' if it exists.
2019-08-09Replace Wikipedia links with Wikidata IDsYorhel1-0/+4
+ Automatically fetch other links from Wikidata Change export-img to maintain a hardlink dir insteadYorhel1-26/+38
For use with rsync daemon. Be more silentYorhel1-2/+2 Actually include import.sql in the db dumpsYorhel1-1/+1
2019-07-22Move votes/traits/tags exports to; Get rid of Multi::APIDumpYorhel1-0/+82
This provides more control over when the dumps are being made and makes it easier to generate quick dumps for debugging.
2019-07-21Add (fullish) database dumpsYorhel1-0/+251