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

Update Django model dasmon_statusvariable id field to bigint #165

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

backmari
Copy link
Contributor

@backmari backmari commented Jun 21, 2024

Short description of the changes:

Dasmon listener was not able to store updates from Dasmon because the table dasmon_statusvariable id field became out of range. The issue was fixed temporarily by making the integer type larger in the production database:

ALTER TABLE dasmon_statusvariable ALTER COLUMN id TYPE BIGINT;

This changes the maximum ID's from 2147483647 to 9223372036854775807. See https://docs.djangoproject.com/en/3.2/ref/models/fields/#bigautofield

This PR is to make that change to the Django model as well so that the next time migrations are run on the database the Django model and database table definition are consistent.

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

References

Defect 5742

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.07%. Comparing base (9ee319e) to head (61f5ec0).

Additional details and impacted files
@@            Coverage Diff             @@
##             next     #165      +/-   ##
==========================================
- Coverage   77.16%   77.07%   -0.09%     
==========================================
  Files          50       50              
  Lines        4634     4616      -18     
==========================================
- Hits         3576     3558      -18     
  Misses       1058     1058              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@backmari backmari merged commit 70d4c67 into next Jun 21, 2024
4 checks passed
@backmari backmari deleted the backmari-patch-1 branch June 21, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants