Skip to content

Instantly share code, notes, and snippets.

@kevinfu2
Created June 9, 2016 09:19
Show Gist options
  • Select an option

  • Save kevinfu2/357bda82cc34a1f4e7a9dee4b8a11cf9 to your computer and use it in GitHub Desktop.

Select an option

Save kevinfu2/357bda82cc34a1f4e7a9dee4b8a11cf9 to your computer and use it in GitHub Desktop.
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.2
-- Dumped by pg_dump version 9.5.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: bus_raw; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE bus_raw (
id integer NOT NULL,
"busId" integer NOT NULL,
dir integer NOT NULL,
stat integer NOT NULL,
"stopA" integer NOT NULL,
"stopB" integer NOT NULL,
flag integer NOT NULL,
"time" timestamp without time zone NOT NULL,
bus character(10) NOT NULL
);
ALTER TABLE bus_raw OWNER TO postgres;
--
-- Name: bus_raw_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE bus_raw_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE bus_raw_id_seq OWNER TO postgres;
--
-- Name: bus_raw_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE bus_raw_id_seq OWNED BY bus_raw.id;
--
-- Name: bus_stops; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE bus_stops (
"Id" integer NOT NULL,
"Desc" character(20) NOT NULL,
line character(10) NOT NULL
);
ALTER TABLE bus_stops OWNER TO postgres;
--
-- Name: COLUMN bus_stops."Id"; Type: COMMENT; Schema: public; Owner: postgres
--
COMMENT ON COLUMN bus_stops."Id" IS '鍏氦ID';
--
-- Name: COLUMN bus_stops."Desc"; Type: COMMENT; Schema: public; Owner: postgres
--
--
-- Name: COLUMN bus_stops.line; Type: COMMENT; Schema: public; Owner: postgres
--
--
-- Name: bus_tmp; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE bus_tmp (
index bigint,
id integer,
"busId" integer,
dir integer,
stat integer,
"stopA" integer,
"stopB" integer,
flag integer,
"time" timestamp without time zone,
bus character(10),
"DescA" character(20),
"DescB" character(20)
);
ALTER TABLE bus_tmp OWNER TO postgres;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY bus_raw ALTER COLUMN id SET DEFAULT nextval('bus_raw_id_seq'::regclass);
--
-- Name: pk_bus_stops; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY bus_stops
ADD CONSTRAINT pk_bus_stops PRIMARY KEY ("Id");
--
-- Name: pk_busstops; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY bus_raw
ADD CONSTRAINT pk_busstops PRIMARY KEY (id);
--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment