• 0
Sgt Smash

Database not deleting base objects after flag removal

Question

Hi everyone

I have noticed when a flag is deleted in the Data base the base objects are not removing themselfs after restart. anyone have any ideas what could cause this?

Share this post


Link to post
Share on other sites

14 answers to this question

  • 1

You have an error in your exile.ini. If you delete a territory flag in database, any associated constructions or storage should automatically delete.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
17 minutes ago, DENA77 said:

Exile-Server/@exileserver/addons/exile_server_config/config.cpp - Class Database

I haven't changed anything there long before this problem popped up

Share this post


Link to post
Share on other sites
Advertisement
  • 0
35 minutes ago, Sgt Smash said:

I haven't changed anything there long before this problem popped up

Shouldn't the objects have to be cached yet in the database the number of days specified in config.cpp after removing the flag.

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, DENA77 said:

Shouldn't the objects have to be cached yet in the database the number of days specified in config.cpp after removing the flag.

Yeah but they wouldn't load in to the server again normally unless you undelete the flag

Share this post


Link to post
Share on other sites
  • 0

It's strange that when it's time for the base to auto delete from ingame it does take the objects ingame with them, but not when i delete the base via DB it ain't no longer doing the same.

Share this post


Link to post
Share on other sites
  • 0

If you are deleting a flag manually from db, I think you also need to delete the objects and vehicles manually.

In theory (haven't been looking at files so I am not 100% sure) there is a check which checks if the territory "rent has been payed, and if not it deletes the flag and all the base objects and virtual garage vehicles after the time specified in config, but I don't know if there is any check, that checks if the flag exists in db, and deletes the objects and vehicles if it doesn't.

Probably it would require a a custom override + addition to your exile.ini for such cases.

Share this post


Link to post
Share on other sites
  • 0

I recently had this problem on a new x64 bit server. I added back in these lines in that @Brett Nordin recently commented out. All base objects (2 weeks old) from abandoned territories deleted after a restart. Thanks to Brett Nordin for the fix & keeping ExtDb3 updated, nice work.

The fix was in exile.ini
(line 634 from https://github.com/BrettNordin/Exile/blob/master/%40ExileServer/sql_custom/exile.ini )

Delete out the comments ;; like this:

Spoiler
; Removes contructions outside territories after ? days
[deleteOldConstructions]
SQL1_1 = DELETE FROM construction WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
SQL2_1 = SET SQL_SAFE_UPDATES=0;
SQL3_1 = DELETE FROM construction WHERE id IN (SELECT id FROM (SELECT * FROM construction WHERE NOT EXISTS (SELECT NULL FROM territory WHERE territory.id = construction.territory_id)) AS c)

SQL4_1 = SET SQL_SAFE_UPDATES=1;

+++ This is a fix that worked for me on a x64 bit database, The 32 bit database (ExtDb2) exile.ini is different. +++

 

Edited by aussie battler
  • Like 1

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, aussie battler said:

I recently had this problem on a new x64 bit server. I added back in these lines in that @Brett Nordin recently commented out. All base objects (2 weeks old) from abandoned territories deleted after a restart. Thanks to Brett Nordin for the fix & keeping ExtDb3 updated, nice work.

The fix was in exile.ini
(line 634 from https://github.com/BrettNordin/Exile/blob/master/%40ExileServer/sql_custom/exile.ini )

Delete out the comments ;; like this:

  Hide contents
; Removes contructions outside territories after ? days
[deleteOldConstructions]
SQL1_1 = DELETE FROM construction WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
SQL2_1 = SET SQL_SAFE_UPDATES=0;
SQL3_1 = DELETE FROM construction WHERE id IN (SELECT id FROM (SELECT * FROM construction WHERE NOT EXISTS (SELECT NULL FROM territory WHERE territory.id = construction.territory_id)) AS c)

SQL4_1 = SET SQL_SAFE_UPDATES=1;

+++ This is a fix that worked for me on a x64 bit database, The 32 bit database (ExtDb2) exile.ini is different. +++

 

Hi dude thanks for the reply

I'm on (ExtDb2). our host did some updates the other week but not sure it changed this but could be wrong

This is what mine looks like in the \@extdb2\extDB\sql_custom_v2\exile.ini  file

Spoiler

; Removes territories (and all containers/constructions) that were not paid within ? days
[deleteUnpaidTerritories]
SQL1_1 = DELETE FROM territory WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY)
Number Of Inputs = 1
SQL1_INPUTS = 1

Does anything look wrong here?

Share this post


Link to post
Share on other sites
  • 0

Just noticed i pasted the wrong part

Spoiler

; Removes contructions outside territories after ? days
[deleteOldConstructions]
SQL1_1 = DELETE FROM construction WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
Number Of Inputs = 1
SQL1_INPUTS = 1

 

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.