📄 create_data-1.2.sql
字号:
-- tpm_users (admin/admin is the default user)
insert into tpm_roles (id, name) values (1, 'ADMIN');
insert into tpm_users (id, name, login, password, roleId, active) values (1, 'Administrator', 'admin', '0DPiKuNIrrVmD8IUCuw1hQxNqZc=', 1, 1);
-- tpm_priorities
insert into tpm_priorities(id, priority, name) values (1, 1, 'MUST_HAVE');
insert into tpm_priorities(id, priority, name) values (2, 2, 'SHOULD_HAVE');
insert into tpm_priorities(id, priority, name) values (3, 3, 'COULD_HAVE');
insert into tpm_priorities(id, priority, name) values (4, 4, 'WONT_HAVE');
-- tmp_features
delete from tpm_role_features;
delete from tpm_privilege_group_features;
delete from tpm_privilege_groups;
delete from tpm_features;
insert into `tpm_features` (code, `position`) values
('accountManager.save',0),
('applicationSettings.save',1),
('userProjects.backlog',2),
('userProjects.taskboard',3),
('historyManager.list',4),
('wiki.pages',5),
('projectActions.list',0),
('projectActions.create',1),
('projectActions.edit',2),
('projectActions.delete',3),
('userActions.list',0),
('userActions.create',1),
('userActions.edit',2),
('userActions.delete',3),
('roleManager.list',0),
('roleManager.create',1),
('roleManager.edit',2),
('roleManager.delete',3),
('userProjects.activities',2),
('iterationManager.list',0),
('iterationManager.create',1),
('iterationManager.edit',2),
('iterationManager.delete',3),
('iterationManager.addUserStory',4),
('iterationManager.removeUserStory',5),
('iterationManager.close', 6),
('userStoryManager.list',0),
('userStoryManager.create',1),
('userStoryManager.edit',2),
('userStoryManager.delete',3),
('userStoryManager.comments',4),
('userStoryImport.importData',5),
('backlogResource.exportData',6),
('userStoryManager.acceptance',7),
('taskManager.list',0),
('taskManager.create',1),
('taskManager.edit',2),
('taskManager.delete',3),
('taskManager.comments',4);
insert into `tpm_privilege_groups` (code, `position`) values
('GENERAL',0),
('ITERATIONS',1),
('USER_STORIES',2),
('TASKS',3),
('MANAGE_USERS',4),
('MANAGE_ROLES',5),
('MANAGE_PROJECTS',6);
insert into `tpm_privilege_group_features` (privilegeGroupCode, featureCode) values
('GENERAL','accountManager.save'),
('GENERAL','applicationSettings.save'),
('GENERAL','userProjects.backlog'),
('GENERAL','userProjects.taskboard'),
('GENERAL','historyManager.list'),
('GENERAL','wiki.pages'),
('MANAGE_PROJECTS','projectActions.list'),
('MANAGE_PROJECTS','projectActions.create'),
('MANAGE_PROJECTS','projectActions.edit'),
('MANAGE_PROJECTS','projectActions.delete'),
('MANAGE_USERS','userActions.list'),
('MANAGE_USERS','userActions.create'),
('MANAGE_USERS','userActions.edit'),
('MANAGE_USERS','userActions.delete'),
('MANAGE_ROLES','roleManager.list'),
('MANAGE_ROLES','roleManager.create'),
('MANAGE_ROLES','roleManager.edit'),
('MANAGE_ROLES','roleManager.delete'),
('ITERATIONS','iterationManager.list'),
('ITERATIONS','iterationManager.create'),
('ITERATIONS','iterationManager.edit'),
('ITERATIONS','iterationManager.delete'),
('ITERATIONS','iterationManager.addUserStory'),
('ITERATIONS','iterationManager.removeUserStory'),
('ITERATIONS','iterationManager.close'),
('USER_STORIES','userStoryManager.list'),
('USER_STORIES','userStoryManager.create'),
('USER_STORIES','userStoryManager.edit'),
('USER_STORIES','userStoryManager.delete'),
('USER_STORIES','userStoryManager.comments'),
('USER_STORIES','userStoryImport.importData'),
('USER_STORIES','backlogResource.exportData'),
('USER_STORIES','userStoryManager.acceptance'),
('TASKS','taskManager.list'),
('TASKS','taskManager.create'),
('TASKS','taskManager.edit'),
('TASKS','taskManager.delete'),
('TASKS','taskManager.comments');
insert into `tpm_system_events` (`code`) values
('com.agilers.tpm.commentAdded'),
('com.agilers.tpm.taskAssigned');
insert into `tpm_properties` (`code`, `value`) values
('com.agilers.tpm.reportEmailAddress', 'support@tinypm.com'),
('com.agilers.tpm.sendingErrorReportsEnabled', 'false'),
('com.agilers.tpm.sendingMachineInfoEnabled', 'true');
-- all features for ADMIN role
insert into `tpm_role_features` (roleId, featureCode) select 1, f.code from `tpm_features` f;
-- default locale
insert into tpm_user_properties(code, userId, value)
select 'com.agilers.tpm.locale', u.Id, 'en' from tpm_users u;
insert into `tpm_revisions`(id, timestamp, userId, userName)
select 1, UNIX_TIMESTAMP() * 1000, min(id), '' from tpm_users;
-- priorities
insert into `tpm_priorities_versions` (id, revision, revisionType, name, priority)
select id, 1, 0, name, priority from tpm_priorities;
-- roles
insert into `tpm_roles_versions` (id, revision, revisionType, name)
select id, 1, 0, name from tpm_roles;
-- users
insert into `tpm_users_versions` (id, revision, revisionType, active, email, login, name, password, roleId)
select id, 1, 0, active, email, login, name, password, roleId from tpm_users;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -