Updated player deletion code to accommodate tables that do not use the column name citizenid#1187
Updated player deletion code to accommodate tables that do not use the column name citizenid#1187tlsharkie wants to merge 3 commits intoqbcore-framework:mainfrom
Conversation
|
This PR has had 60 days of inactivity & will close within 7 days |
tlsharkie
left a comment
There was a problem hiding this comment.
removed trailing whitespaces
tlsharkie
left a comment
There was a problem hiding this comment.
removed trailing whitespaces from functions.lua to pass lint tests
|
updated code and removed trailing whitespaces to pass lint tests |
|
This includes tables that do not exist in qbcore |
Z3rio
left a comment
There was a problem hiding this comment.
Overall looks good to me, just some tables that shouldnt be there, otherwise I'd be fine to approve this :)
server/player.lua
Outdated
| { table = 'bank_cards', key = 'identifier' }, | ||
| { table = 'bank_history', key = 'identifier' }, | ||
| { table = 'casino_players', key = 'identifier' }, | ||
| { table = 'cd_garage_privategarage', key = 'identifier' }, | ||
| { table = 'inventory_clothes', key = 'identifier' }, | ||
| { table = 'lation_detecting', key = 'identifier' }, | ||
| { table = 'm_hunting', key = 'identifier' }, | ||
|
|
||
| --Tables with other citizenid labels | ||
| { table = 'bank_process', key = 'owner' }, | ||
| { table = 'mail_accounts', key = 'owner' }, | ||
| { table = 'lation_chopshop', key = 'player_identifier' }, |
There was a problem hiding this comment.
None of these exist on a normal/default qbcore server.
There was a problem hiding this comment.
I am fine with you remvoving the non-qbcore tables from the official push.
Please use the addtional tables as a reference for how to use the new format.
There was a problem hiding this comment.
I am fine with you remvoving the non-qbcore tables from the official push. Please use the addtional tables as a reference for how to use the new format.
This is your PR, so I cant remove them for you. Sorry
|
This PR has had 60 days of inactivity & will close within 7 days |
|
Sorry for the delay on this one. Removed non-QBCore tables from the player deletion code. |
|
This PR has had 60 days of inactivity & will close within 7 days |
Updated `Delete character` code to handle database tables where primary key is not `citizenid` Changed `playertables` format to handle any primary key Updated `DeleteCharater()` and `ForceDeleteCharater()` SQL commands
Updated player.lua to only include default QBCore tables for the character deletion.
Updated player deletion code in
server/player.luato accommodate tables that do not use the column namecitizenid.Many scripts use other column names to store the
citizenidbut contain data that should be deleted upon character deletion. This leads to excess data build up in the database that is no longer needed and currently requires manual effort to clean out the database.New format for
playertablesnow contains table and key variables (primary key column name)and updated SQL commands in
DeleteCharacterandForceDeleteCharacterto handle variable column namesChecklist