Do not link repositories by projects.identifier because it cann't be changed.

This commit is contained in:
Kolan Sh 2014-05-11 17:42:30 +04:00
parent 066e42523e
commit 745d49ebe0
2 changed files with 2 additions and 4 deletions

View File

@ -48,8 +48,7 @@ CHILI_ID_GITORIOUS_REPO=`mysql --default-character-set=utf8 -h$MYSQL_HOSTNAME -u
AND $CHILI_MYSQL_DBNAME.member_roles.role_id=$CHILI_MYSQL_DBNAME.roles.id
AND $CHILI_MYSQL_DBNAME.members.user_id=$CHILI_MYSQL_DBNAME.users.id
AND $CHILI_MYSQL_DBNAME.members.project_id=$CHILI_MYSQL_DBNAME.projects.id
AND ($CHILI_MYSQL_DBNAME.projects.name=$GITORIOUS_MYSQL_DBNAME.repositories.name
OR $CHILI_MYSQL_DBNAME.projects.identifier=$GITORIOUS_MYSQL_DBNAME.repositories.name)
AND $CHILI_MYSQL_DBNAME.projects.name=$GITORIOUS_MYSQL_DBNAME.repositories.name
AND $CHILI_MYSQL_DBNAME.users.type='User'
AND $CHILI_MYSQL_DBNAME.users.mail=$GITORIOUS_MYSQL_DBNAME.users.email
AND $CHILI_MYSQL_DBNAME.roles.name IN ($roles_mysql_string)

View File

@ -74,8 +74,7 @@ for i in `seq 0 $((nrepos-1))`; do
[ "$USERID" == "" ] && continue
PROJECTID=`mysql -h$CHILI_MYSQL_HOSTNAME -u $CHILI_MYSQL_USER -e "SELECT DISTINCT id FROM $CHILI_MYSQL_DBNAME.projects
WHERE (name='${repos_names[$i]}'
OR identifier='${repos_names[$i]}')
WHERE name='${repos_names[$i]}'
AND status='1'" \
| grep -v tables_col|xargs|sed "s/ /\n/g"|tail -n+2`
[ "$PROJECTID" == "" ] && continue