forked from sunflowerLan/flaskPro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
33 lines (29 loc) · 877 Bytes
/
init.sql
File metadata and controls
33 lines (29 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
drop table if exists users;
create table users(
id integer primary key autoincrement,
name text not null,
age integer,
sex integer,
height real,
weight real
);
drop table if exists actions;
create table actions(
id integer primary key autoincrement,
action_name text not null,
body_part text not null
);
drop table if exists records;
create table records(
id integer primary key autoincrement,
body_part text not null,
action_id integer,
train_weight real DEFAULT 0,
rm real DEFAULT 0,
train_day TimeStamp NOT NULL DEFAULT (datetime('now','localtime'))
);
insert into users values(1,"张巍",33,1,178.8,78.8);
insert into actions values(1,"标准俯卧撑","胸部");
insert into actions values(2,"窄距俯卧撑","胸部");
insert into records values(1,"胸部",1,10,15,1503326966);
insert into records values(2,"胸部",2,0,10,1503326966);