Browse Source

Update 'README.md'

天问 1 year ago
parent
commit
b358b584a7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      README.md

+ 3 - 0
README.md

@@ -29,6 +29,9 @@ class User(Base):
     username = Column(String(50), unique=True)
     email = Column(String(100), unique=True)
 
+# 初始化表
+Base.metadata.create_all(bind=engine)
+
 # 查询
 dept_info = SessionLocal.query(User) \
     .filter(User.status == 0,