diff --git a/.gitignore b/.gitignore index 86babfcf7b0fd59a61e897d5f9d03d3983ee0c49..63db2dca9534911a0c88695707a1ee2b936fefe8 100644 --- a/.gitignore +++ b/.gitignore @@ -62,7 +62,7 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +sql/_build/ # PyBuilder target/ diff --git a/config.py b/config.py index 07803242a3418e5205a1832b88183697d7d4eff4..30c76bc07e9ae5ed409ea65ad8b8cdc8a5b936fa 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 diff --git a/requirements.txt b/requirements.txt index 1bc8a4f25d152878656d880aeb17a570b88db5d1..b0ccf0436a6702fbfaa06b7015584185574afcd8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,5 @@ pytest pymysql python-dotenv scikit-learn -tensorflow +tensorflow==1.15 werkzeug diff --git a/scheme.sql b/sql/scheme.sql similarity index 77% rename from scheme.sql rename to sql/scheme.sql index 9212753e595569994565a957b1a98d492bef0d07..2cdaea63ab04de650fa02df46ffb841cff9104af 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