27dbde4310cd70188d047f4b4c03736e7fb92928
[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 (note: replacing all creator ids like below still did not secure total ownership
16 to fred; some things retained their original creator.  how!?)
17
18 ==============
19
20 replace all the creator ids with fred's id on ducky:
21
22   update inventoryitems set creatorid = 'NEWGUID'
23
24 => do for each of the tables.
25
26 ==============
27
28 checking to make sure the changes to creatorid took effect:
29
30   select * from assets where creatorid != 'YOURGUID'
31
32 => there should be no matches after running a setting operation.
33
34 ==============
35
36 if you have a more selective update to do, try replacing using a pattern:
37
38   update assets set creatorid = replace(creatorid, 'OLDGUID', 'NEWGUID')
39
40 ==============
41
42
43