Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save harmeetsingh0013/4b0191e4cea9704a87ee7f2cb5fd4d10 to your computer and use it in GitHub Desktop.
Save harmeetsingh0013/4b0191e4cea9704a87ee7f2cb5fd4d10 to your computer and use it in GitHub Desktop.
CREATE TABLE public.search_keys
(
id uuid NOT NULL,
key character varying(50),
CONSTRAINT search_keys_pkey PRIMARY KEY (id)
)
CREATE TABLE public.repo_info
(
id integer NOT NULL,
key uuid NOT NULL,
name character varying(150),
full_name character varying(150),
owner character varying(150),
url character varying(150),
languages_url character varying(150),
ssh_url character varying(150),
clone_url character varying(150),
homepage character varying(150),
watchers_count bigint,
watchers bigint,
forks bigint,
CONSTRAINT repo_info_pkey PRIMARY KEY (id),
CONSTRAINT valid_key FOREIGN KEY (key)
REFERENCES public.search_keys (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment