Just remove the user. Everything else should be removed automatically by foreign key constraints.
After removing the user from the system all the information remains in the database. I checked.
What database are you using? If MySQL, what engine?
Server MySQL 5.5.45
Table type InnoDB
Are you sure it wasn't MyISAM when you installed Traccar? That would explain the problem.
The information about tables: InnoDB
Everything is working. But after removing the user from the system all his records remain in the database.
How to automatically delete all user created in program?
You should check if there are any foreign key constraints on the table. If not, it must have been using or still is using MyISAM engine.
I watched this information in phpmyadmin.
How can I check?
Try searching for it. I'm not a huge expert on MySQL.
I do not see in the scripts to remove all user information. It is not written in the traccar((
I can write in the conf:
<entry key='database.deleteUser'> DELETE FROM users WHERE id = :id DELETE FROM notifications WHERE userid = :id DELETE FROM user_device WHERE userid = :id DELETE FROM user_geofence WHERE userid = :id DELETE FROM user_group WHERE userid = :id </entry>
But i dont know how delete information from tables:
attribute_aliases
devices
device_geofence
events
geofences
groups
group_geofence
These tables are not linked by User ID
If there are no foreign keys, it means that you are using MyISAM which doesn't support this functionality. You should be using InnoDB with Traccar.
I 100% using InnoDB with Traccar.
You program deletes the user and all that he created from this tables?
attribute_aliases
devices
device_geofence
events
geofences
groups
group_geofence
I am sure that you, too, is an old user information
Check it.
Full user removal information is not implemented in base.
Please read my comments carefully. If you are using correct database engine that supports foreign keys, everything is removed properly. Not sure why you keep repeating that it's not implemented. I have multiple servers on which it works perfectly fine.
Hello.
How remove user from database mysql and all that he created?
How to delete all that the user has created in this tables:
attribute_aliases
devices
device_geofence
events
geofences
groups
group_geofence
Thank you!