first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / database / configuration / database / sql / replace_creatorid_fields.sql
1
2 # this sql statement fixes ownership for items that may have come in with
3 # erroneous owner UUIDs due to second inventory and the vagaries of crossing
4 # between grids.
5 # this particular example is pretty brutal.  it finds any item that is owned
6 # by the old avatar ID {old_ID} and swaps out the owner with the {new_ID}
7 # avatar.  This task is made more difficult by the lack of a wildcard in
8 # the SQL replace function, so we only stomp out one bogus ID at a time.
9
10 UPDATE inventoryitems
11 SET creatorid = replace(creatorid, '{old_ID}', '{new_ID}')
12 WHERE creatorid == '{old_ID}';
13
14