Open Vernalhav opened 4 years ago
I think we should have two tables: one for users and one for polls. Each user and each poll should have a unique ID so that they can be referenced. The user should have a list of poll IDs they have created (and maybe another list with the IDs they have participated in). The poll should have the title, ID of the user that created and how many votes there are for each category. I believe adding in more information is not our priority since we aim to release an MVP.
I agree with @Vernalhav , two tables, one for the users and the other for polls, is fine. What database system should we use? What do you think of PostgreSQL, so we can use SQLAlchemy, which is a widely used ORM. There's even Flask-SQLAlchemy, which is specific for Flask.
I've made a PR to configure Flask-SQLAlchemy, and the database. https://github.com/flossschool/pollex/pull/33
I've created a pull request to keep working on @leodaher 's changes https://github.com/flossschool/pollex/pull/35
@ET33 was working on it last class. Have you finished it?
I guess with @gdezan PR, it is done.
I left a comment there (PR #35 ). I think we need a bit more modeling and there I explained some flaws I could find. Let me know what you guys think.
And please, leave a reference when referencing a PR or Issue :)
We must define which fields are going to be present in our database.