Skip to content

Commit

Permalink
fix db scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Sep 2, 2024
1 parent 31cd399 commit f7e5978
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
4 changes: 4 additions & 0 deletions db/wedpr_admin_dml.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- 管理端初始化
insert into wedpr_user (username, password, status) values('admin', '{bcrypt}$2a$10$XuiuKLg23kxtC/ldvYN0/evt0Y3aoBC9iV29srhIBMMDORzCQiYA.', 0);
insert into wedpr_user_role(username, role_id) values ('admin', '10');
insert into wedpr_role_permission (role_id, role_name, permission_id) values ('10', 'admin_user', '1');
15 changes: 14 additions & 1 deletion db/wedpr_db_drop.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,21 @@ drop table if exists `wedpr_sync_status_table`;
drop table if exists `wedpr_authorization_table`;
drop table if exists `wedpr_follower_table`;
drop table if exists `wedpr_authorization_template_table`;
drop table if exists `wedpr_job_dataset_relation`;
drop table if exists `wedpr_project_table`;
drop table if exists `wedpr_job_table`;
drop table if exists `wedpr_setting_template`;
drop table if exists `wedpr_dataset`;
drop table if exists `wedpr_dataset_permission`;
drop table if exists `wedpr_dataset_permission`;
drop table if exists `wedpr_group`;
drop table if exists `wedpr_group_detail`;
drop table if exists `wedpr_user`;
drop table if exists `wedpr_user_role`;
drop table if exists `wedpr_role_permission`;
drop table if exists `wedpr_permission`;
drop table if exists `wedpr_agency`;
drop table if exists `wedpr_cert`;
drop table if exists `wedpr_api_credential_table`;
drop table if exists `wedpr_published_service`;
drop table if exists `wedpr_service_invoke_table`;
drop table if exists `wedpr_jupyter_table`;
9 changes: 2 additions & 7 deletions db/wedpr_dml.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,5 @@ insert into wedpr_group_detail (group_id, username, status) values('100000000000
-- 站点端初始化
insert into wedpr_user (username, password, status) values('admin', '{bcrypt}$2a$10$9ZhDOBp.sRKat4l14ygu/.LscxrMUcDAfeVOEPiYwbcRkoB09gCmi', 0);
insert into wedpr_user_role(username, role_id) values ('admin', '1');
insert into wedpr_role_permission (role_id, role_name, permission_id) values ('1', 'admin_user', '1')
insert into wedpr_role_permission (role_id, role_name, permission_id) values ('2', 'original_user', '2')

-- 管理端初始化
insert into wedpr_user (username, password, status) values('admin', '{bcrypt}$2a$10$XuiuKLg23kxtC/ldvYN0/evt0Y3aoBC9iV29srhIBMMDORzCQiYA.', 0);
insert into wedpr_user_role(username, role_id) values ('admin', '10');
insert into wedpr_role_permission (role_id, role_name, permission_id) values ('10', 'admin_user', '1')
insert into wedpr_role_permission (role_id, role_name, permission_id) values ('1', 'admin_user', '1');
insert into wedpr_role_permission (role_id, role_name, permission_id) values ('2', 'original_user', '2');

0 comments on commit f7e5978

Please sign in to comment.