加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
create.sql 2.55 KB
一键复制 编辑 原始数据 按行查看 历史
yxin 提交于 2024-09-11 22:13 . feat:v2.0
create table user (
user_id int auto_increment primary key,
user_name varchar(55) not null,
user_pwd_hash varchar(255) not null,
salt varchar(50) not null,
constraint user_name unique (user_name)
);
create table file (
file_id int auto_increment primary key,
file_name varchar(255) not null,
user_id int not null,
file_path varchar(255) not null,
file_type int not null,
file_hash varchar(255) null,
is_deleted tinyint(1) default 1 not null,
father_id int not null,
upload_status tinyint(1) default 0 null,
constraint user_id foreign key (user_id) references user (user_id)
);
create index father_id on file (father_id);
insert into disk.user (user_id, user_name, user_pwd_hash, salt)
values (
1,
'root',
'$2a$08$b3f615bf24d9063365c86uSSozkkl5L9QcG.En895frYpzvtt93pu',
'b3f615bf24d9063365c866128c54e1fa'
),
(
2,
'user',
'$2a$08$e1bcbd42ea16dacd5380bOH1blLTHlDqjmLIa03Y.MGoL/9XlRCPi',
'e1bcbd42ea16dacd5380ba0c52f5ea2f'
);
insert into disk.file (
file_id,
file_name,
user_id,
file_path,
file_type,
file_hash,
is_deleted,
father_id,
upload_status
)
values (1, '/', 1, '/', 1, null, 0, -1, null),
(2, 'code', 1, '/code', 1, null, 0, 1, null),
(3, 'text', 1, '/text', 1, null, 0, 1, null),
(
4,
'helloworld.c',
1,
'/code/helloworld.c',
2,
'aa698a7fb1fea1e7ab30aedf196238b699d63a5a517cb3816340b2ce6755e546',
0,
2,
1
),
(
5,
'helloworld.py',
1,
'/code/python/helloworld.py',
2,
'faa252ca11e6eb7e6987e4d608b94d219d156f5070d1e4f88c0ed8374e41ccf9',
0,
14,
1
),
(
6,
'斗破苍穹.txt',
1,
'/text/斗破苍穹.txt',
2,
'6229822f9299139b62b186d74d7b0a155a92df90d12a86d691685f6a75f5e0aa',
0,
3,
1
),
(
7,
'白银圣经.txt',
1,
'/text/白银圣经.txt',
2,
'38ad0d2da460119c8684346567c3d1598376c48fe6108daf36b2eba3f41d5a99',
0,
3,
1
),
(
8,
'ichika.jpeg',
1,
'/ichika.jpeg',
2,
'67893d6e05adf4834f9af9445433a1aa2efbfd997524dbccfb8616e791c78583',
0,
1,
1
),
(9, '/', 2, '/', 1, null, 0, -1, null),
(10, 'text', 2, '/text', 1, null, 0, 9, null),
(
11,
'白银圣经.txt',
2,
'/text/白银圣经.txt',
2,
'38ad0d2da460119c8684346567c3d1598376c48fe6108daf36b2eba3f41d5a99',
0,
10,
1
),
(
12,
'ichika.jpeg',
2,
'/text/ichika.jpeg',
2,
'67893d6e05adf4834f9af9445433a1aa2efbfd997524dbccfb8616e791c78583',
1,
10,
1
),
(
13,
'text.txt',
2,
'/text/text.txt',
2,
'9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08',
1,
10,
1
),
(
14,
'python',
1,
'/code/python',
1,
null,
0,
2,
null
);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化