Add databaseTransitionSchedule entity and tool for updating (#926)

* Add databaseTransitionSchedule entitiy

* add UpdateDatabaseTransitionScheduleCommand

* small fixes

* change entity structure to no longer be singleton

* add get command

* fix getCache

* Change id to TransitionId enum

* more fixes

* Cleanup tests

* Add link to javadoc

* Add lastUpdateTime

* fix datatype of getCached
This commit is contained in:
sarahcaseybot 2021-02-08 17:22:00 -05:00 committed by GitHub
parent d73e557acc
commit bdf9124e87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 633 additions and 0 deletions

View file

@ -2,6 +2,7 @@ AllocationToken
Cancellation
ContactResource
Cursor
DatabaseTransitionSchedule
DomainBase
EntityGroupRoot
EppResourceIndex

View file

@ -78,6 +78,20 @@ class google.registry.model.common.Cursor {
google.registry.model.UpdateAutoTimestamp lastUpdateTime;
org.joda.time.DateTime cursorTime;
}
class google.registry.model.common.DatabaseTransitionSchedule {
@Id java.lang.String transitionId;
@Parent com.googlecode.objectify.Key<google.registry.model.common.EntityGroupRoot> parent;
google.registry.model.UpdateAutoTimestamp lastUpdateTime;
google.registry.model.common.TimedTransitionProperty<google.registry.model.common.DatabaseTransitionSchedule$PrimaryDatabase, google.registry.model.common.DatabaseTransitionSchedule$PrimaryDatabaseTransition> databaseTransitions;
}
enum google.registry.model.common.DatabaseTransitionSchedule$PrimaryDatabase {
CLOUD_SQL;
DATASTORE;
}
class google.registry.model.common.DatabaseTransitionSchedule$PrimaryDatabaseTransition {
google.registry.model.common.DatabaseTransitionSchedule$PrimaryDatabase primaryDatabase;
org.joda.time.DateTime transitionTime;
}
class google.registry.model.common.EntityGroupRoot {
@Id java.lang.String id;
google.registry.model.UpdateAutoTimestamp updateTimestamp;