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

Refactor Box object in config.py to Machine model in database #28

Closed
eshaan7 opened this issue Mar 17, 2020 · 4 comments · Fixed by #43
Closed

Refactor Box object in config.py to Machine model in database #28

eshaan7 opened this issue Mar 17, 2020 · 4 comments · Fixed by #43
Assignees
Labels

Comments

@eshaan7
Copy link
Member

eshaan7 commented Mar 17, 2020

Currently, the machine details are stored in a JSON object (box) in config.py file.

What's required:
Need to shift this into a Machine model in the SQL database (via SQLAlchemy model)
This will also enable support for multiple machines as described in issue #17.
Afterwards, we can create a rating system as described in issue #14.

@eshaan7 eshaan7 pinned this issue Mar 17, 2020
This was referenced Mar 17, 2020
@svensevenslow
Copy link
Contributor

Hi! Can I work on this?

@eshaan7
Copy link
Member Author

eshaan7 commented Mar 17, 2020

Do remember that: You will need to make changes everywhere in the code and the templates, create_db.py as well. Also, would need to change the Score model to accommodate the new Machine model. In the Score model, we will need to add a foreign key to the machine ID.

Also, in the Machine model, please have these necessary fields:
id:int, name:string, user_hash:string, root_hash:string, user_points:int, root_points:int, os:string, ip_addr:string

PS - If you are able to do this, then #17 should be quite easy. So it's a two for one deal. :)

@svensevenslow
Copy link
Contributor

Thanks for the explanation. I'll get back to you if I have any queries.

@svensevenslow
Copy link
Contributor

Hi! I have opened a PR. Let me know what you think

@eshaan7 eshaan7 linked a pull request Apr 11, 2020 that will close this issue
@eshaan7 eshaan7 unpinned this issue Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants