From 9f41312bb06c490ac88f768fcfbf599ac8edaf88 Mon Sep 17 00:00:00 2001 From: joizhang Date: Tue, 16 Nov 2021 16:20:41 +0800 Subject: [PATCH 1/3] refactor: tensorflow==1.15. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1bc8a4f..b0ccf04 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,5 @@ pytest pymysql python-dotenv scikit-learn -tensorflow +tensorflow==1.15 werkzeug -- Gitee From 68b2418e995fa6c373bfb0faab173a77968d028e Mon Sep 17 00:00:00 2001 From: joizhang Date: Tue, 16 Nov 2021 16:38:18 +0800 Subject: [PATCH 2/3] refactor: update sql. --- .gitignore | 2 +- scheme.sql => sql/scheme.sql | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) rename scheme.sql => sql/scheme.sql (77%) diff --git a/.gitignore b/.gitignore index 86babfc..63db2dc 100644 --- a/.gitignore +++ b/.gitignore @@ -62,7 +62,7 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +sql/_build/ # PyBuilder target/ diff --git a/scheme.sql b/sql/scheme.sql similarity index 77% rename from scheme.sql rename to sql/scheme.sql index 9212753..2cdaea6 100644 --- a/scheme.sql +++ b/sql/scheme.sql @@ -1,10 +1,13 @@ -- 用户表 create table t_user ( - id int primary key auto_increment, + id int not null auto_increment, name varchar(32) not null, - cell_phone_number varchar(32) not null -); + cell_phone_number varchar(32) not null, + primary key (`id`) +) ENGINE = InnoDB + AUTO_INCREMENT = 1 + DEFAULT CHARSET = utf8mb4; -- 签到表 t_sign_in # create table t_sign_in @@ -30,12 +33,15 @@ create table t_user drop table if exists t_photo; create table t_photo ( - id int primary key auto_increment, + id int not null auto_increment, name varchar(512) not null, embedding blob not null, user_id int not null, + primary key (`id`), constraint userid foreign key (user_id) references t_user (id) -); +) ENGINE = InnoDB + AUTO_INCREMENT = 1 + DEFAULT CHARSET = utf8mb4; -- 用户签到表 t_user_sign # create table t_user_sign -- Gitee From 52ff2aefbf82e84bd16c01e34b6d207e26ce14ed Mon Sep 17 00:00:00 2001 From: joizhang Date: Tue, 16 Nov 2021 17:12:39 +0800 Subject: [PATCH 3/3] update. --- config.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/config.py b/config.py index 0780324..30c76bc 100644 --- a/config.py +++ b/config.py @@ -12,10 +12,8 @@ if os.path.exists('.env'): class Config: ENV = os.getenv("ENV") LOG_TO_STDOUT = (os.getenv("LOG_TO_STDOUT") == 'true') - SQLALCHEMY_ECHO = (os.getenv("SQLALCHEMY_ECHO") == 'true') SQLALCHEMY_TRACK_MODIFICATIONS = (os.getenv("SQLALCHEMY_TRACK_MODIFICATIONS") == 'true') - FACE_NET_MODEL_PATH = os.getenv('FACE_NET_MODEL_PATH') @staticmethod -- Gitee