Page 1 of 1

Removing unused Items from the database

Posted: Fri 20 Jan 2012 3:22 am
by Zoi
Is there an easy way to remove items not on the template from the database?

Posted: Fri 20 Jan 2012 9:08 am
by IV/JG7_4Shades
You can do it via SQL, something like:

Code: Select all

UPDATE Object_Specifications SET Nationality='z' WHERE NOT EXISTS (SELECT DISTINCT Obj_Type FROM ObjMissionData WHERE Object_Specifications.Object_Type=ObjMissionData.Obj_Type);
This assumes that all campaign objects to be used are in the ObjMissionData table already.

Alternatively, disable all objects in Object_Specifications using

Code: Select all

UPDATE Object_Specifications SET Nationality='z'
and then re-enable the ones you want by changing Nationality back to 'r', 'g' or 'n' by hand.

Cheers,
4Shades

Posted: Fri 20 Jan 2012 5:29 pm
by Zoi
Thanks 4Shades I may try this. I'm finding this all kind of challenging :D