Skip to content

Commit

Permalink
Merge pull request #13 from adniyaYousaf/database-setup
Browse files Browse the repository at this point in the history
Successfully setup the database
  • Loading branch information
MarcusZagorski authored Apr 23, 2024
2 parents deb5893 + 3ca3833 commit 292cd89
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 6 deletions.
86 changes: 80 additions & 6 deletions db/initdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,84 @@

DROP TABLE IF EXISTS videos CASCADE;

CREATE TABLE videos (
title VARCHAR,
src VARCHAR
);
CREATE TABLE videos (title VARCHAR, src VARCHAR);

INSERT INTO videos (title,src) VALUES ('Never Gonna Give You Up','https://www.youtube.com/watch?v=dQw4w9WgXcQ');
-- you can insert more rows using example data from the example_data.csv file
INSERT INTO
videos (title, src)
VALUES
(
'Never Gonna Give You Up',
'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
);

INSERT INTO
videos (title, src)
VALUES
(
'The Coding Train',
'https://www.youtube.com/watch?v=HerCR8bw_GE'
);

INSERT INTO
videos (title, src)
VALUES
(
'Mac & Cheese | Basics with Babish',
'https://www.youtube.com/watch?v=FUeyrEN14Rk'
);

INSERT INTO
videos (title, src)
VALUES
(
'Videos for Cats to Watch - 8 Hour Bird Bonanza',
'https://www.youtube.com/watch?v=xbs7FT7dXYc'
);

INSERT INTO
videos (title, src)
VALUES
(
'The Complete London 2012 Opening Ceremony | London 2012 Olympic Games',
'https://www.youtube.com/watch?v=4As0e4de-rI'
);

INSERT INTO
videos (title, src)
VALUES
(
'Learn Unity - Beginner''s Game Development Course',
'https://www.youtube.com/watch?v=gB1F9G0JXOo'
);

INSERT INTO
videos (title, src)
VALUES
(
'Cracking Enigma in 2021 - Computerphile',
'https://www.youtube.com/watch?v=RzWB5jL5RX0'
);

INSERT INTO
videos (title, src)
VALUES
(
'Coding Adventure: Chess AI',
'https://www.youtube.com/watch?v=U4ogK0MIzqk'
);

INSERT INTO
videos (title, src)
VALUES
(
'Why the Tour de France is so brutal',
'https://www.youtube.com/watch?v=ZacOS8NBK6U'
);

INSERT INTO
videos (title, src)
VALUES
(
'Coding Adventure: Ant and Slime Simulations',
'https://www.youtube.com/watch?v=X-iSQQgOd1A'
);
56 changes: 56 additions & 0 deletions videorec_backup.sql.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
--
-- PostgreSQL database dump
--

-- Dumped from database version 14.11 (Ubuntu 14.11-0ubuntu0.22.04.1)
-- Dumped by pg_dump version 14.11 (Ubuntu 14.11-0ubuntu0.22.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;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: videos; Type: TABLE; Schema: public; Owner: adniya
--

CREATE TABLE public.videos (
title character varying,
src character varying
);


ALTER TABLE public.videos OWNER TO adniya;

--
-- Data for Name: videos; Type: TABLE DATA; Schema: public; Owner: adniya
--

COPY public.videos (title, src) FROM stdin;
Never Gonna Give You Up https://www.youtube.com/watch?v=dQw4w9WgXcQ
The Coding Train https://www.youtube.com/watch?v=HerCR8bw_GE
Mac & Cheese | Basics with Babish https://www.youtube.com/watch?v=FUeyrEN14Rk
Videos for Cats to Watch - 8 Hour Bird Bonanza https://www.youtube.com/watch?v=xbs7FT7dXYc
The Complete London 2012 Opening Ceremony | London 2012 Olympic Games https://www.youtube.com/watch?v=4As0e4de-rI
Learn Unity - Beginner's Game Development Course https://www.youtube.com/watch?v=gB1F9G0JXOo
Cracking Enigma in 2021 - Computerphile https://www.youtube.com/watch?v=RzWB5jL5RX0
Coding Adventure: Chess AI https://www.youtube.com/watch?v=U4ogK0MIzqk
Why the Tour de France is so brutal https://www.youtube.com/watch?v=ZacOS8NBK6U
Coding Adventure: Ant and Slime Simulations https://www.youtube.com/watch?v=X-iSQQgOd1A
\.


--
-- PostgreSQL database dump complete
--

0 comments on commit 292cd89

Please sign in to comment.