Support:Database Cleanup: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
No edit summary
imported>Hendrik Brummermann
No edit summary
Line 20: Line 20:
) AND status='active';
) AND status='active';
</source>
</source>



== Metrics for discontinuted accounts ==
== Metrics for discontinuted accounts ==


* Must have no entries in gameEvents (2008-06-30, 2009-08-17), itemlog (2008-03-24), accountban
* Must have no entries in gameEvents (2008-06-30, 2009-08-17), itemlog (2008-03-24), kills (2010-01-08), accountban
* Remember to clean additional tables, character_stats, accountLink, ...
* Remember to clean additional tables, character_stats, accountLink, ...
* Criteria
* Criteria
Line 30: Line 31:
** no valuable items
** no valuable items
** <del>No other characters on that account that are not candidates</del> Multi character support is younger than 2008-06-30.
** <del>No other characters on that account that are not candidates</del> Multi character support is younger than 2008-06-30.

=== Cleanup Script ===

<source lang="sql>
INSERT INTO del2 SELECT charname FROM del WHERE items='0 leather_armor, 0 club';
INSERT INTO del2 SELECT charname FROM del WHERE items='0 club, 0 leather_armor';


DELETE FROM del2 WHERE EXISTS (SELECT null FROM gameEvents WHERE charname=source);
'''DELETE FROM del2 WHERE EXISTS (SELECT null FROM gameEvents_2008_08_21 WHERE charname=source);'''
DELETE FROM del2 WHERE EXISTS (SELECT null FROM gameEvents_2009_02_19 WHERE charname=source);
DELETE FROM del2 WHERE EXISTS (SELECT null FROM gameEvents_2009_08_17 WHERE charname=source);

</source>