From d65dd44a87a30e960b16d11387bd395218042390 Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Tue, 26 Jan 2021 00:26:27 +0100 Subject: [PATCH] work --- org/woehlke/covid19/common/common_model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org/woehlke/covid19/common/common_model.py b/org/woehlke/covid19/common/common_model.py index 8f05215c..e31f9ba3 100644 --- a/org/woehlke/covid19/common/common_model.py +++ b/org/woehlke/covid19/common/common_model.py @@ -9,6 +9,7 @@ class CommonDatum(db.Model): id = db.Column(db.Integer, primary_key=True) date_string = db.Column(db.String(255), nullable=False, unique=True, primary_key=True) + datum = db.Column(db.Date, nullable=False, unique=True, primary_key=True ) year_week = db.Column(db.String(255), nullable=True, unique=True) year_day_of_year = db.Column(db.String(255), nullable=True, unique=True) year = db.Column(db.Integer, nullable=True) @@ -27,6 +28,7 @@ class CommonDatum(db.Model): o = CommonDatum(date_string=date_string) # put year # put month + # put datum # day_of_month # compute day_of_year # compute week_of_year -- GitLab