Skip to content
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

fix: house_lists version column in database with wrong type #1716

Merged
merged 8 commits into from
Oct 20, 2023
Merged

fix: house_lists version column in database with wrong type #1716

merged 8 commits into from
Oct 20, 2023

Conversation

lamonato29
Copy link
Contributor

@lamonato29 lamonato29 commented Oct 19, 2023

Description

The column is defined with the type int, which receives a maximum value of 4.294.967.295. Therefore, it was showing an error when saving the database table. The solution I found was to change the type of the version column from INT to BIGINT.

Behaviour

Actual

Unable to save house lists.
Showing error in console: "Query: INSERT INTO house_lists (house_id , listid , list, version) VALUES ...."

Expected

Normally saving the houses.

Fixes #issuenumber

Type of change

  • [x ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

I've changed the type in database and run /save with GOD account. The save is now working as expected.

[2023-19-10 09:21:17.403] [info] The server will save all accounts within 60 seconds. You might lag or freeze for 5 seconds, please find a safe place.
[2023-19-10 09:22:17.409] [info] CLEAN: Removed 7 items from 7 tiles in 0 seconds
[2023-19-10 09:22:17.409] [info] Saving server...
[2023-19-10 09:22:18.126] [info] Saved house items in 0.454 seconds
[2023-19-10 09:22:18.205] [info] Server save complete. Next save in 1 hour!

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • [ x] My code follows the style guidelines of this project
  • [ x] I have performed a self-review of my own code
  • [ x] I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings
  • [ x] I have added tests that prove my fix is effective or that my feature works

The column is defined with the type int, which receives a maximum value of 4.294.967.295. Therefore, it was showing an error when saving the database table. The solution I found was to change the type of the version column from INT to BIGINT.
@luan
Copy link
Contributor

luan commented Oct 19, 2023

This would also require a migration, not just a change to the schema. Check out the data-otservbr-global/migrations directory

@luan luan merged commit b8e6688 into opentibiabr:main Oct 20, 2023
@lamonato29 lamonato29 deleted the fix-database-house_lists-version-column-type branch October 22, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants