Merge "Drop Accounts table"

This commit is contained in:
Edwin Kempin
2017-08-30 13:21:25 +00:00
committed by Gerrit Code Review
6 changed files with 28 additions and 47 deletions

View File

@@ -1,33 +0,0 @@
// Copyright (C) 2008 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.reviewdb.server;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gwtorm.server.Access;
import com.google.gwtorm.server.OrmException;
import com.google.gwtorm.server.PrimaryKey;
import com.google.gwtorm.server.Query;
import com.google.gwtorm.server.ResultSet;
/** Access interface for {@link Account}. */
public interface AccountAccess extends Access<Account, Account.Id> {
/** Locate an account by our locally generated identity. */
@Override
@PrimaryKey("accountId")
Account get(Account.Id key) throws OrmException;
@Query("ORDER BY accountId")
ResultSet<Account> all() throws OrmException;
}

View File

@@ -47,8 +47,7 @@ public interface ReviewDb extends Schema {
// Deleted @Relation(id = 4)
@Relation(id = 6)
AccountAccess accounts();
// Deleted @Relation(id = 6)
// Deleted @Relation(id = 7)

View File

@@ -76,11 +76,6 @@ public class ReviewDbWrapper implements ReviewDb {
return delegate.systemConfig();
}
@Override
public AccountAccess accounts() {
return delegate.accounts();
}
@Override
public AccountGroupAccess accountGroups() {
return delegate.accountGroups();

View File

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

View File

@@ -0,0 +1,26 @@
// Copyright (C) 2017 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;
/** Drop ACCOUNTS table. */
public class Schema_158 extends SchemaVersion {
@Inject
Schema_158(Provider<Schema_157> prior) {
super(prior);
}
}

View File

@@ -14,7 +14,6 @@
package com.google.gerrit.testutil;
import com.google.gerrit.reviewdb.server.AccountAccess;
import com.google.gerrit.reviewdb.server.AccountGroupAccess;
import com.google.gerrit.reviewdb.server.AccountGroupByIdAccess;
import com.google.gerrit.reviewdb.server.AccountGroupByIdAudAccess;
@@ -82,11 +81,6 @@ public class DisabledReviewDb implements ReviewDb {
throw new Disabled();
}
@Override
public AccountAccess accounts() {
throw new Disabled();
}
@Override
public AccountGroupAccess accountGroups() {
throw new Disabled();