Drop Accounts table
Accounts have been fully migrated to NoteDb and the Accounts table is no longer accessed. Hence it can be dropped now. Change-Id: I51459bf7520ad83c8f9f73757bdbe752c32db1ae Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
parent
c3090eef40
commit
32cd45af3c
@ -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;
|
|
||||||
}
|
|
@ -47,8 +47,7 @@ public interface ReviewDb extends Schema {
|
|||||||
|
|
||||||
// Deleted @Relation(id = 4)
|
// Deleted @Relation(id = 4)
|
||||||
|
|
||||||
@Relation(id = 6)
|
// Deleted @Relation(id = 6)
|
||||||
AccountAccess accounts();
|
|
||||||
|
|
||||||
// Deleted @Relation(id = 7)
|
// Deleted @Relation(id = 7)
|
||||||
|
|
||||||
|
@ -76,11 +76,6 @@ public class ReviewDbWrapper implements ReviewDb {
|
|||||||
return delegate.systemConfig();
|
return delegate.systemConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountAccess accounts() {
|
|
||||||
return delegate.accounts();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AccountGroupAccess accountGroups() {
|
public AccountGroupAccess accountGroups() {
|
||||||
return delegate.accountGroups();
|
return delegate.accountGroups();
|
||||||
|
@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
/** A version of the database schema. */
|
/** A version of the database schema. */
|
||||||
public abstract class SchemaVersion {
|
public abstract class SchemaVersion {
|
||||||
/** The current schema version. */
|
/** 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() {
|
public static int getBinaryVersion() {
|
||||||
return guessVersion(C);
|
return guessVersion(C);
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
package com.google.gerrit.testutil;
|
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.AccountGroupAccess;
|
||||||
import com.google.gerrit.reviewdb.server.AccountGroupByIdAccess;
|
import com.google.gerrit.reviewdb.server.AccountGroupByIdAccess;
|
||||||
import com.google.gerrit.reviewdb.server.AccountGroupByIdAudAccess;
|
import com.google.gerrit.reviewdb.server.AccountGroupByIdAudAccess;
|
||||||
@ -82,11 +81,6 @@ public class DisabledReviewDb implements ReviewDb {
|
|||||||
throw new Disabled();
|
throw new Disabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AccountAccess accounts() {
|
|
||||||
throw new Disabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AccountGroupAccess accountGroups() {
|
public AccountGroupAccess accountGroups() {
|
||||||
throw new Disabled();
|
throw new Disabled();
|
||||||
|
Loading…
Reference in New Issue
Block a user