r1.2.0_add_user.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pydbvolve 作者: Teamworksapp 项目源码 文件源码
def create_user_table(conn):
    create_sql = """
create table users
(
    id int primary key,
    username text not null,
    hashpw text not null,
    salt text not null,
    last_login_ts timestamp
);
"""
    index_sql = """
create index ix01_users on users(username);
"""

    with conn.cursor() as cur:
        cur.execute(create_sql)
        cur.execute(index_sql)
# End create_user_table
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号