Skip to content

Instantly share code, notes, and snippets.

@freynaud
Last active December 10, 2015 06:38
Show Gist options
  • Save freynaud/4395625 to your computer and use it in GitHub Desktop.
Save freynaud/4395625 to your computer and use it in GitHub Desktop.
toc.dat100600 004000 002000 00000012470 12067251257 007315 0ustar00PGDMP   p
dp99uttps1eot9.2.29.2.2¶00ENCODINGENCODINGSET client_encoding = 'UTF8';
falseß00
STDSTRINGS
STDSTRINGS(SET standard_conforming_strings = 'on';
false¨125916420rolesTABLEPCREATE TABLE roles (
id integer NOT NULL,
role character varying(20)
);
DROP TABLE public.roles;
publicpostgresfalse´125916418 roles_id_seqSEQUENCEnCREATE SEQUENCE roles_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
#DROP SEQUENCE public.roles_id_seq;
publicpostgresfalse172®00 roles_id_seqSEQUENCE OWNED BY/ALTER SEQUENCE roles_id_seq OWNED BY roles.id;
publicpostgresfalse171™125916412sessionsTABLEACREATE TABLE sessions (
session text,
user_id integer
);
DROP TABLE public.sessions;
publicpostgresfalseÆ125916443 user_roleTABLEECREATE TABLE user_role (
role_id integer,
user_id integer
);
DROP TABLE public.user_role;
publicpostgresfalse©125916403usersTABLEOCREATE TABLE users (
name text,
email text,
id integer NOT NULL
);
DROP TABLE public.users;
publicpostgresfalse≠125916426 users_id_seqSEQUENCEnCREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
#DROP SEQUENCE public.users_id_seq;
publicpostgresfalse169©00 users_id_seqSEQUENCE OWNED BY/ALTER SEQUENCE users_id_seq OWNED BY users.id;
publicpostgresfalse173ñ260416423idDEFAULTVALTER TABLE ONLY roles ALTER COLUMN id SET DEFAULT nextval('roles_id_seq'::regclass);
7ALTER TABLE public.roles ALTER COLUMN id DROP DEFAULT;
publicpostgresfalse171172172ï260416428idDEFAULTVALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
7ALTER TABLE public.users ALTER COLUMN id DROP DEFAULT;
publicpostgresfalse173169°016420roles
TABLE DATA"COPY roles (id, role) FROM stdin;
publicpostgresfalse1722209.dat™00 roles_id_seq SEQUENCE SET3SELECT pg_catalog.setval('roles_id_seq', 3, true);
publicpostgresfalse171ü016412sessions
TABLE DATA-COPY sessions (session, user_id) FROM stdin;
publicpostgresfalse1702207.dat£016443 user_role
TABLE DATA.COPY user_role (role_id, user_id) FROM stdin;
publicpostgresfalse1742211.datû016403users
TABLE DATA)COPY users (name, email, id) FROM stdin;
publicpostgresfalse1692206.dat´00 users_id_seq SEQUENCE SET3SELECT pg_catalog.setval('users_id_seq', 1, true);
publicpostgresfalse173ö260616425
roles_pkey
CONSTRAINTGALTER TABLE ONLY roles
ADD CONSTRAINT roles_pkey PRIMARY KEY (id);
:ALTER TABLE ONLY public.roles DROP CONSTRAINT roles_pkey;
publicpostgresfalse172172ò260616436
users_pkey
CONSTRAINTGALTER TABLE ONLY users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
:ALTER TABLE ONLY public.users DROP CONSTRAINT users_pkey;
publicpostgresfalse169169õ260616456sessions_user_id_fkey
FK CONSTRAINToALTER TABLE ONLY sessions
ADD CONSTRAINT sessions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
HALTER TABLE ONLY public.sessions DROP CONSTRAINT sessions_user_id_fkey;
publicpostgresfalse1691702200ú260616446user_role_role_id_fkey
FK CONSTRAINTqALTER TABLE ONLY user_role
ADD CONSTRAINT user_role_role_id_fkey FOREIGN KEY (role_id) REFERENCES roles(id);
JALTER TABLE ONLY public.user_role DROP CONSTRAINT user_role_role_id_fkey;
publicpostgresfalse1721742202ù260616451user_role_user_id_fkey
FK CONSTRAINTqALTER TABLE ONLY user_role
ADD CONSTRAINT user_role_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
JALTER TABLE ONLY public.user_role DROP CONSTRAINT user_role_user_id_fkey;
publicpostgresfalse17422001692209.dat100600 004000 002000 00000000034 12067251257 007115 0ustar001 admin
2 write
3 read
\.
2207.dat100600 004000 002000 00000000241 12067251257 007113 0ustar00MD5:6005cd1e80e9c42c6e355f247236391b 1
MD5:6005cd1e80e9c42c6e355f247236391b 1
MD5:6005cd1e80e9c42c6e355f247236391b 1
MD5:6005cd1e80e9c42c6e355f247236391b 1
\.
2211.dat100600 004000 002000 00000000021 12067251257 007102 0ustar001 1
2 1
3 1
\.
2206.dat100600 004000 002000 00000000052 12067251257 007112 0ustar00Moorata [email protected] 1
\.
restore.sql100600 004000 002000 00000011631 12067251257 010240 0ustar00--
-- NOTE:
--
-- File paths need to be edited. Search for $$PATH$$ and
-- replace it with the path to the directory containing
-- the extracted data files.
--
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
ALTER TABLE ONLY public.user_role DROP CONSTRAINT user_role_user_id_fkey;
ALTER TABLE ONLY public.user_role DROP CONSTRAINT user_role_role_id_fkey;
ALTER TABLE ONLY public.sessions DROP CONSTRAINT sessions_user_id_fkey;
ALTER TABLE ONLY public.users DROP CONSTRAINT users_pkey;
ALTER TABLE ONLY public.roles DROP CONSTRAINT roles_pkey;
ALTER TABLE public.users ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.roles ALTER COLUMN id DROP DEFAULT;
DROP SEQUENCE public.users_id_seq;
DROP TABLE public.users;
DROP TABLE public.user_role;
DROP TABLE public.sessions;
DROP SEQUENCE public.roles_id_seq;
DROP TABLE public.roles;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: roles; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE roles (
id integer NOT NULL,
role character varying(20)
);
ALTER TABLE public.roles OWNER TO postgres;
--
-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE roles_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.roles_id_seq OWNER TO postgres;
--
-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE roles_id_seq OWNED BY roles.id;
--
-- Name: sessions; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE sessions (
session text,
user_id integer
);
ALTER TABLE public.sessions OWNER TO postgres;
--
-- Name: user_role; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE user_role (
role_id integer,
user_id integer
);
ALTER TABLE public.user_role OWNER TO postgres;
--
-- Name: users; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE users (
name text,
email text,
id integer NOT NULL
);
ALTER TABLE public.users OWNER TO postgres;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO postgres;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE users_id_seq OWNED BY users.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY roles ALTER COLUMN id SET DEFAULT nextval('roles_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
--
-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY roles (id, role) FROM stdin;
\.
COPY roles (id, role) FROM '$$PATH$$/2209.dat';
--
-- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('roles_id_seq', 3, true);
--
-- Data for Name: sessions; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY sessions (session, user_id) FROM stdin;
\.
COPY sessions (session, user_id) FROM '$$PATH$$/2207.dat';
--
-- Data for Name: user_role; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY user_role (role_id, user_id) FROM stdin;
\.
COPY user_role (role_id, user_id) FROM '$$PATH$$/2211.dat';
--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY users (name, email, id) FROM stdin;
\.
COPY users (name, email, id) FROM '$$PATH$$/2206.dat';
--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('users_id_seq', 1, true);
--
-- Name: roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY roles
ADD CONSTRAINT roles_pkey PRIMARY KEY (id);
--
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: sessions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sessions
ADD CONSTRAINT sessions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
--
-- Name: user_role_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY user_role
ADD CONSTRAINT user_role_role_id_fkey FOREIGN KEY (role_id) REFERENCES roles(id);
--
-- Name: user_role_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY user_role
ADD CONSTRAINT user_role_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
--
-- PostgreSQL database dump complete
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment