nice new tester for archives, plus a renaming.
[feisty_meow.git] / database / patterns / mysql / opensim / db_queries_for_opensim.txt
1
2
3 ==============
4
5 find all the tables that have a CreatorID column:
6
7   SELECT DISTINCT TABLE_NAME 
8     FROM INFORMATION_SCHEMA.COLUMNS
9     WHERE COLUMN_NAME IN ('CreatorId')
10         AND TABLE_SCHEMA='opensim';
11
12 => yields assets inventoryitems prims primitems
13 as tables matching the column.
14
15 ==============
16
17 replace all the creator ids with fred's id on ducky:
18
19   update inventoryitems set creatorid = 'NEWGUID'
20
21 => do for each of the tables.
22
23 ==============
24
25 checking to make sure the changes to creatorid took effect:
26
27   select * from assets where creatorid != 'YOURGUID'
28
29 => there should be no matches after running a setting operation.
30
31 ==============
32
33 if you have a more selective update to do, try replacing using a pattern:
34
35   update assets set creatorid = replace(creatorid, 'OLDGUID', 'NEWGUID')
36
37 ==============
38
39 note: replacing all creator ids like above still does not secure total
40 ownership for everything in inventory or even in the sim; nested objects in
41 inventory do not seem to be affected, and the contents of objects nested in
42 live objects also are not affected.
43