Allow to tag reviews

In order to be able to filter out non-human comments and votes we need
to tag them.

This change introduces new property to the ReviewInput object called
'tag'. This allows us to add some meta information about where this vote
come from. Then in the UI we can show/hide comments and votes that have
different tags.

Also ApprovalInfo, CommentInfo and ChangeMessageInfo were extended to
include value of 'tag' property read from DB.

To be able to persist those data new column (tag) was introduced to
change_messages, patch_set_comments and patch_set_approvals tables.

Change-Id: If6378c5a9f4e0673c00ab348297549f27a06110b
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
Dariusz Luksza
2016-03-15 14:05:51 +01:00
committed by Dave Borowitz
parent b50cd86eff
commit c70e862596
25 changed files with 379 additions and 31 deletions

View File

@@ -32,7 +32,7 @@ import java.util.List;
/** A version of the database schema. */
public abstract class SchemaVersion {
/** The current schema version. */
public static final Class<Schema_121> C = Schema_121.class;
public static final Class<Schema_122> C = Schema_122.class;
public static int getBinaryVersion() {
return guessVersion(C);

View File

@@ -0,0 +1,27 @@
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server.schema;
import com.google.inject.Inject;
import com.google.inject.Provider;
public class Schema_122 extends SchemaVersion {
@Inject
Schema_122(Provider<Schema_121> prior) {
super(prior);
}
// Adds tag column
}