Group
1. access gerrit sql database
cmd:
ssh -p 29418 192.168.0.1 gerritgsql
2. gerrit> deletefrom ACCOUNT_GROUP_NAMES where name=<groupname>;
3. gerrit> deletefrom ACCOUNT_GROUPS where name=<groupname>;
Project
1. access gerrit sql database
cmd:
ssh -p 29418 192.168.0.1 gerritgsql
2. gerrit> deletefrom projects where name=<projectname>;
3. gerrit> deletefrom ref_rights where project_name=<projectname>;
4. go to folder /gerrit/review_site/git, remove<project name>.git
Example for remove project:
Step 1:
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/db> ssh-p 29418 150.236.40.165 gerrit gsql
Welcome to Gerrit Code Review 2.1.6.1
(H2 1.2.134 (2010-04-23))
Type '\h' for help. Type '\r' to clear thebuffer.
gerrit>
Step 2:
gerrit> deletefrom projects where name='rmproject';
UPDATE 1; 1 ms
Step 3:
gerrit> deletefrom ref_rightswhere project_name='rmproject';
UPDATE 1; 1 ms
Step 4:
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/git> ls
fproject.git rmproject.git
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/git> rm-rf rmproject.git/
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/git> ls
fproject.git
1. access gerrit sql database
2. gerrit> deletefrom ACCOUNT_GROUP_NAMES where name=<groupname>;
3. gerrit> deletefrom ACCOUNT_GROUPS where name=<groupname>;
Project
1. access gerrit sql database
2. gerrit> deletefrom projects where name=<projectname>;
3. gerrit> deletefrom ref_rights where project_name=<projectname>;
4. go to folder /gerrit/review_site/git, remove<project name>.git
Example for remove project:
Step 1:
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/db> ssh-p 29418 150.236.40.165 gerrit gsql
Welcome to Gerrit Code Review 2.1.6.1
(H2 1.2.134 (2010-04-23))
Type '\h' for help.
gerrit>
Step 2:
gerrit> deletefrom projects where name='rmproject';
UPDATE 1; 1 ms
Step 3:
gerrit> deletefrom ref_rightswhere
UPDATE 1; 1 ms
Step 4:
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/git> ls
fproject.git
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/git> rm-rf rmproject.git/
ecdshawk@mtvserver2:/project/ecds/gerrit/review_site/git> ls
fproject.git