-
Notifications
You must be signed in to change notification settings - Fork 982
Updated player deletion code to accommodate tables that do not use the column name citizenid #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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
…e column name citizenid Updated player deletion code in server/player.lua to accommodate tables that do not use the column name citizenid Many scripts use other column names to store the citizenid but 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.
This PR has had 60 days of inactivity & will close within 7 days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed trailing whitespaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed trailing whitespaces from functions.lua to pass lint tests
Removed trailing whitespace to pass lint tests
updated code and removed trailing whitespaces to pass lint tests |
This includes tables that do not exist in qbcore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, just some tables that shouldnt be there, otherwise I'd be fine to approve this :)
{ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these exist on a normal/default qbcore server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Updated player deletion code in
server/player.lua
to accommodate tables that do not use the column namecitizenid
.Many scripts use other column names to store the
citizenid
but 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
playertables
now contains table and key variables (primary key column name)and updated SQL commands in
DeleteCharacter
andForceDeleteCharacter
to handle variable column namesChecklist