path: root/util/
AgeCommit message (Collapse)AuthorFilesLines
11 daysFix staff alias editingYorhel1-1/+1
Broken when adding the staff_alias.c_search GENERATED COLUMN. The column was being created in the temporary table, including the NOT NULL constraint but excluding the GENERATED part, so it would get filled with NULL and throw an error.
2021-03-01SQL: vndbid data type conversion for most DB entriesYorhel1-13/+21
I had wanted to split this up into multiple commits and roll out in stages, but couldn't really find a natural way to do so. There are several places that take a generic identifier and expect it to work the same for all entries they support, so changing one entry at a time wasn't going to be any easier. Only the tags & traits haven't been updated yet, I'll convert those later. While this is a major change and affects a lot of code, the individual changes are all pretty simple. I'm surprised how much code did not have to be updated at all. No doubt I've missed a few places, though, so this commit will almost certainly break something.
2020-04-04SQL reorg: Move util/sql/ to sql/ as a top-level dirYorhel1-1/+1
Been wanting to do this for a while... I've kept util/sql as a symlink for compatibility with the devdump, old update scripts and other code I may have forgotten. I'll remove it later.
2019-09-17Rename VNDBSchema to VNDB::Schema and let it figure out the root path itselfYorhel1-2/+2
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).
2019-07-21Add (fullish) database dumpsYorhel1-29/+16
2015-10-21SQL: Fix editing + func.sql + triggers.sql + autocreate editing funcsYorhel1-0/+112
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.