Skip to content
Snippets Groups Projects
Commit 86d4a6b3 authored by danielmyren's avatar danielmyren
Browse files

Add more statistics to the DB

parent b9f7bcd7
No related branches found
No related tags found
No related merge requests found
......@@ -65,4 +65,11 @@ class SweElectionResult(db.Model):
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
db_county_code: Mapped[int] = mapped_column(Integer, nullable=False)
db_county_name: Mapped[str] = mapped_column(String(255), nullable=False)
db_votes_each_year: Mapped[dict] = mapped_column(JSON, nullable=True) # Contains the votes for each year in that län per party
\ No newline at end of file
db_votes_each_year: Mapped[dict] = mapped_column(JSON, nullable=True) # Contains the votes for each year in that län per party
db_total_votes_all_years: Mapped[int] = mapped_column(Integer, nullable=False)
class SweDemographicResult(db.Model):
__tablename__ = "swe_demographic_results"
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
db_county_code: Mapped[int] = mapped_column(Integer, nullable=False)
db_data: Mapped[dict] = mapped_column(JSON, nullable=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment