Add number_guess.sql
This commit is contained in:
125
number_guess.sql
Normal file
125
number_guess.sql
Normal file
@@ -0,0 +1,125 @@
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
-- Dumped from database version 12.17 (Ubuntu 12.17-1.pgdg22.04+1)
|
||||
-- Dumped by pg_dump version 12.17 (Ubuntu 12.17-1.pgdg22.04+1)
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
SET client_encoding = 'UTF8';
|
||||
SET standard_conforming_strings = on;
|
||||
SELECT pg_catalog.set_config('search_path', '', false);
|
||||
SET check_function_bodies = false;
|
||||
SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
DROP DATABASE number_guessing_game;
|
||||
--
|
||||
-- Name: number_guessing_game; Type: DATABASE; Schema: -; Owner: freecodecamp
|
||||
--
|
||||
|
||||
CREATE DATABASE number_guessing_game WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'C.UTF-8' LC_CTYPE = 'C.UTF-8';
|
||||
|
||||
|
||||
ALTER DATABASE number_guessing_game OWNER TO freecodecamp;
|
||||
|
||||
\connect number_guessing_game
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
SET client_encoding = 'UTF8';
|
||||
SET standard_conforming_strings = on;
|
||||
SELECT pg_catalog.set_config('search_path', '', false);
|
||||
SET check_function_bodies = false;
|
||||
SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- Name: users; Type: TABLE; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
CREATE TABLE public.users (
|
||||
user_id integer NOT NULL,
|
||||
games_played integer DEFAULT 0 NOT NULL,
|
||||
best_game integer,
|
||||
username character varying(22) NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.users OWNER TO freecodecamp;
|
||||
|
||||
--
|
||||
-- Name: users_user_id_seq; Type: SEQUENCE; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.users_user_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.users_user_id_seq OWNER TO freecodecamp;
|
||||
|
||||
--
|
||||
-- Name: users_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.users_user_id_seq OWNED BY public.users.user_id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: users user_id; Type: DEFAULT; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.users ALTER COLUMN user_id SET DEFAULT nextval('public.users_user_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
INSERT INTO public.users VALUES (32, 2, 7, 'Faab');
|
||||
INSERT INTO public.users VALUES (34, 2, 401, 'user_1730602033338');
|
||||
INSERT INTO public.users VALUES (33, 5, 141, 'user_1730602033339');
|
||||
INSERT INTO public.users VALUES (36, 2, 55, 'user_1730602067068');
|
||||
INSERT INTO public.users VALUES (35, 5, 69, 'user_1730602067069');
|
||||
|
||||
|
||||
--
|
||||
-- Name: users_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval('public.users_user_id_seq', 36, true);
|
||||
|
||||
|
||||
--
|
||||
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.users
|
||||
ADD CONSTRAINT users_pkey PRIMARY KEY (user_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: freecodecamp
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.users
|
||||
ADD CONSTRAINT users_username_key UNIQUE (username);
|
||||
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
Reference in New Issue
Block a user