CREATE TABLE public."Lock" (
    id uuid NOT NULL,
    "Target" uuid NOT NULL,
    "LockedBy" uuid NOT NULL,
    "LockedAt" timestamp NOT NULL,
    "TouchedAt" timestamp
);

ALTER TABLE ONLY public."Lock"
    ADD CONSTRAINT "Lock_pkey" PRIMARY KEY (id);

ALTER TABLE ONLY public."Lock"
    ADD CONSTRAINT "LockUserReference" FOREIGN KEY ("LockedBy") REFERENCES public."UserInfo"(id);

