Expand group names to be 255 characters

I was surprised by unexpected server failures when creating a new
group with a fairly long name.  The root cause was the db rejected
the value because it was more than 40 characters.  So expand our
column to 255, like project names.  40 is just not a reasonable
restriction, and we had no good reason for it.

While doing this I discovered we weren't fully using the new
AccountGroupName object right, e.g. the schema creator didn't
create it for the 3 default groups, and query logic was using
the unindexed account_groups.name column, not the indexed name
in account_group_names.  So fix all of that.

Change-Id: If1cb7abbde07df65ebbfdf851faed5e857707209
Signed-off-by: Shawn O. Pearce <sop@google.com>
Reviewed-by: Nico Sallembien <nsallembien@google.com>
This commit is contained in:
Shawn O. Pearce
2010-01-27 18:47:52 -08:00
parent 0df4ba0ad0
commit 3b08693f02
11 changed files with 139 additions and 22 deletions

View File

@@ -14,7 +14,7 @@
package com.google.gerrit.common.data;
import com.google.gerrit.reviewdb.AccountGroup;
import com.google.gerrit.reviewdb.AccountGroupName;
import com.google.gerrit.reviewdb.Project;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwtjsonrpc.client.RemoteJsonService;
@@ -32,5 +32,5 @@ public interface SuggestService extends RemoteJsonService {
AsyncCallback<List<AccountInfo>> callback);
void suggestAccountGroup(String query, int limit,
AsyncCallback<List<AccountGroup>> callback);
AsyncCallback<List<AccountGroupName>> callback);
}