Index the allocation token's redemption history entry field

We need this to efficiently query which tokens have and have not been redeemed.

I'm also marking it as nullable for consistency with the domain name field (it's
already null for unredeemed tokens).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214366534
This commit is contained in:
mcilwain 2018-09-24 18:19:40 -07:00 committed by jianglai
parent c89cb6a3f3
commit 9faf7181c3
2 changed files with 3 additions and 1 deletions

View file

@ -48,10 +48,12 @@ public class AllocationTokenTest extends EntityTestCase {
persistResource(
new AllocationToken.Builder()
.setToken("abc123")
.setRedemptionHistoryEntry(Key.create(HistoryEntry.class, 1L))
.setDomainName("blahdomain.fake")
.setCreationTimeForTest(DateTime.parse("2010-11-12T05:00:00Z"))
.build()),
"token",
"redemptionHistoryEntry",
"domainName");
}