Jump to content
Sign in to follow this  
2gunz

Proper way to delete unused tents from server?

Recommended Posts

We have a trainload of unused tents on the server.

I would like to just delete them from the DB manually, Is there a problem with that?

Does somebody have a safer, better and/or faster way?

Thanks!

Share this post


Link to post
Share on other sites

I'm not the best at these things but i'm pretty sure if you want to remove unused tents you may also need to remove the other tents

Share this post


Link to post
Share on other sites

.

Edited by ebay

Share this post


Link to post
Share on other sites

Thanks for the help....

I a bit confused about the foreign key restraint thing.

The survivors dont need to disappear. Just the tents.

In the Survivor DB I dont see mention of tents.

From looking at the survivor DB and the Tent DB it would appear that the tent is attached to the person VIA player ID, and the person (in the survivor DB anyway) doesnt call any tent information.

Anyway please correct me if Im wrong.... I need to get this sorted.

Share this post


Link to post
Share on other sites

This sounds like a simple query will do the job.

This will remove all tents from the database which were not used for 2 weeks.

Make sure to stop the server before executing it.

This will show you all the tents:

SELECT * FROM instance_deployable WHERE deployable_id = 1 AND last_updated < NOW() - INTERVAL 2 WEEK

This deletes them:

DELETE FROM instance_deployable WHERE deployable_id = 1 AND last_updated < NOW() - INTERVAL 2 WEEK

This only works if your server is based on Bliss.

I didn't test it.

So use the upper query first and check the dates.

You don't need to remove any survivors.

Edited by DomiStyle
  • Like 2

Share this post


Link to post
Share on other sites

.

Edited by ebay

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×