Schema_152 + Schema_157: Ignore missing index
We want to drop the index. If it is already gone it is also fine. On upgrade of my test site these schema migrations failed because the index was missing. In other schema migrations (e.g. Schema_145) we handle missing indexes the same way. Change-Id: I5d26634b08fb8b6852e0fe2303d2f851c650f29b Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
parent
d1251e5512
commit
26c4847e26
@ -36,6 +36,8 @@ public class Schema_152 extends SchemaVersion {
|
||||
SqlDialect dialect = schema.getDialect();
|
||||
try (StatementExecutor e = newExecutor(db)) {
|
||||
dialect.dropIndex(e, "accounts", "accounts_byFullName");
|
||||
} catch (OrmException ex) {
|
||||
// Ignore. The index did not exist.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ public class Schema_157 extends SchemaVersion {
|
||||
SqlDialect dialect = schema.getDialect();
|
||||
try (StatementExecutor e = newExecutor(db)) {
|
||||
dialect.dropIndex(e, "accounts", "accounts_byPreferredEmail");
|
||||
} catch (OrmException ex) {
|
||||
// Ignore. The index did not exist.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user