2023-10-24 16:27:13 +08:00
|
|
|
-- 创建用户登录表
|
|
|
|
create table if not exists login_users (
|
|
|
|
userid integer primary key,
|
2023-10-25 11:38:19 +08:00
|
|
|
name varchar(50) unique, -- 用户名唯一
|
2023-10-24 16:27:13 +08:00
|
|
|
password varchar(50)
|
|
|
|
);
|
|
|
|
-- 创建温湿度信息表
|
|
|
|
create table if not exists temp_hum_info (
|
|
|
|
thid integer primary key,
|
|
|
|
temperature double,
|
|
|
|
humidity double,
|
|
|
|
th_date_time datetime
|
|
|
|
);
|
|
|
|
-- 创建用户操作记录表
|
|
|
|
create table if not exists record_of_operations (
|
|
|
|
operid integer primary key,
|
|
|
|
oper_user_name varchar(50),
|
|
|
|
operation_detail text,
|
|
|
|
operation_time datetime
|
|
|
|
);
|
|
|
|
-- 列举显示已经创建的表
|
|
|
|
.tables
|