mirror of
https://github.com/google/nomulus.git
synced 2025-05-30 01:10:14 +02:00
Add a DAO for RegistryLock objects (#290)
* Add a DAO for RegistryLock objects * Add an index on verification code and remove old file * Move to v4 * Use camelCase in index names * Javadoc fixes * Allow alteration of RegistryLock objects in-place * save, load-modify, read in separate transactions * Change the creation timestamp to be a CreateAutoTimestamp
This commit is contained in:
parent
ebc8d54f94
commit
a259dee986
5 changed files with 193 additions and 32 deletions
|
@ -12,19 +12,5 @@
|
|||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
CREATE TABLE "RegistryLock" (
|
||||
revision_id BIGSERIAL NOT NULL,
|
||||
action TEXT NOT NULL,
|
||||
completion_timestamp TIMESTAMPTZ,
|
||||
creation_timestamp TIMESTAMPTZ NOT NULL,
|
||||
domain_name TEXT NOT NULL,
|
||||
is_superuser BOOLEAN NOT NULL,
|
||||
registrar_id TEXT NOT NULL,
|
||||
registrar_poc_id TEXT,
|
||||
repo_id TEXT NOT NULL,
|
||||
verification_code TEXT NOT NULL,
|
||||
PRIMARY KEY (revision_id)
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS "RegistryLock"
|
||||
ADD CONSTRAINT idx_registry_lock_repo_id_revision_id UNIQUE (repo_id, revision_id);
|
||||
create index if not exists idx_registry_lock_verification_code ON "RegistryLock"
|
||||
using btree (verification_code);
|
|
@ -220,6 +220,13 @@ ALTER TABLE ONLY public."RegistryLock"
|
|||
ADD CONSTRAINT idx_registry_lock_repo_id_revision_id UNIQUE (repo_id, revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_registry_lock_verification_code; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx_registry_lock_verification_code ON public."RegistryLock" USING btree (verification_code);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ClaimsEntry fk6sc6at5hedffc0nhdcab6ivuq; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue