Add the schema and DAO for Locks in CloudSQL (#462)

* Add the schema and DAO for Locks in CloudSQL

* Addresses some comments

* Change number on flyway file

* Small changes

* More small changes

* Use checkArgumentNotNull instead of checkNotNull

* Address comments

* fix javadocs

* update persistence
This commit is contained in:
sarahcaseybot 2020-02-13 10:22:10 -05:00 committed by GitHub
parent 62433c2238
commit 22a879e655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 392 additions and 0 deletions

View file

@ -116,6 +116,19 @@ CREATE TABLE public."Domain" (
);
--
-- Name: Lock; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public."Lock" (
resource_name text NOT NULL,
tld text NOT NULL,
acquired_time timestamp with time zone NOT NULL,
expiration_time timestamp with time zone NOT NULL,
request_log_id text NOT NULL
);
--
-- Name: PremiumEntry; Type: TABLE; Schema: public; Owner: -
--
@ -374,6 +387,14 @@ ALTER TABLE ONLY public."Domain"
ADD CONSTRAINT "Domain_pkey" PRIMARY KEY (repo_id);
--
-- Name: Lock Lock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."Lock"
ADD CONSTRAINT "Lock_pkey" PRIMARY KEY (resource_name, tld);
--
-- Name: PremiumEntry PremiumEntry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--