Add domain repo ID and token type indexes to AllocationToken table (#1560)

These are useful for the purposes of filtering by one-time/multi-use tokens, and
for determining which one-time tokens have been used (and if so, for which
domain).
This commit is contained in:
Ben McIlwain
2022-03-17 13:58:45 -04:00
committed by GitHub
parent 60c156c061
commit 6c20d39a2d
7 changed files with 1474 additions and 1388 deletions
@@ -0,0 +1,17 @@
-- Copyright 2022 The Nomulus Authors. All Rights Reserved.
--
-- 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.
CREATE INDEX IDX9g3s7mjv1yn4t06nqid39whss ON "AllocationToken" (token_type);
CREATE INDEX IDXtmlqd31dpvvd2g1h9i7erw6aj ON "AllocationToken" (redemption_domain_repo_id);