for contact db update
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 24 Feb 2014 16:38:57 +0000 (16:38 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 24 Feb 2014 16:38:57 +0000 (16:38 +0000)
Toolkit/Contacts/Database/data/contact.sql
Toolkit/Contacts/Database/data/contact_inq.sql
Toolkit/Contacts/Database/data/news_response.sql
Toolkit/Contacts/Database/data/query_db.sql
Toolkit/Contacts/Database/dbDump.sh
Toolkit/Contacts/Database/loadData.sql

index 2289ff9..1f9d70c 100644 (file)
@@ -11,52 +11,6 @@ SET escape_string_warning = off;
 
 SET search_path = public, pg_catalog;
 
-SET default_tablespace = '';
-
-SET default_with_oids = true;
-
---
--- Name: contact; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE contact (
-    id integer DEFAULT nextval(('"contact_id_seq"'::text)::regclass) NOT NULL,
-    create_date date DEFAULT now(),
-    fname text,
-    lname text,
-    address text,
-    city text,
-    state text,
-    zip text,
-    country text,
-    phone text,
-    fax text,
-    email text,
-    user_agent text,
-    remote_addr text,
-    mail_ok boolean,
-    referred_by integer,
-    unit_size integer,
-    questions text,
-    arrive_date date,
-    depart_date date,
-    other text,
-    interest text,
-    contestant boolean,
-    contact_type text,
-    number_of_golfers text,
-    number_of_non_golfers text,
-    number_of_couples text,
-    number_of_singles text,
-    number_of_golfers_2 text,
-    tee_time text,
-    phone2 text,
-    courses text
-);
-
-
-ALTER TABLE public.contact OWNER TO postgres;
-
 --
 -- Data for Name: contact; Type: TABLE DATA; Schema: public; Owner: postgres
 --
@@ -7176,23 +7130,6 @@ INSERT INTO contact (id, create_date, fname, lname, address, city, state, zip, c
 INSERT INTO contact (id, create_date, fname, lname, address, city, state, zip, country, phone, fax, email, user_agent, remote_addr, mail_ok, referred_by, unit_size, questions, arrive_date, depart_date, other, interest, contestant, contact_type, number_of_golfers, number_of_non_golfers, number_of_couples, number_of_singles, number_of_golfers_2, tee_time, phone2, courses) VALUES (10166, '2014-02-23', 'Don', 'Henderson', '15530 Oporto st', 'Livonia', 'MI', '48154', NULL, '7344217835', NULL, 'Dhenders323@aol.com', 'Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53', '162.239.252.135', true, NULL, NULL, NULL, NULL, NULL, NULL, ':10:12:11:22:', NULL, ':2:', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
 
---
--- Name: contact_id_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE UNIQUE INDEX contact_id_key ON contact USING btree (id);
-
-
---
--- Name: contact; Type: ACL; Schema: public; Owner: postgres
---
-
-REVOKE ALL ON TABLE contact FROM PUBLIC;
-REVOKE ALL ON TABLE contact FROM postgres;
-GRANT ALL ON TABLE contact TO postgres;
-GRANT ALL ON TABLE contact TO nobody;
-
-
 --
 -- PostgreSQL database dump complete
 --
index ae391d1..1abb511 100644 (file)
@@ -11,52 +11,6 @@ SET escape_string_warning = off;
 
 SET search_path = public, pg_catalog;
 
-SET default_tablespace = '';
-
-SET default_with_oids = true;
-
---
--- Name: contact_inq; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE contact_inq (
-    id integer NOT NULL,
-    header text,
-    pos integer,
-    description text,
-    image text
-);
-
-
-ALTER TABLE public.contact_inq OWNER TO postgres;
-
---
--- Name: contact_inq_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
---
-
-CREATE SEQUENCE contact_inq_id_seq
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
-ALTER TABLE public.contact_inq_id_seq OWNER TO postgres;
-
---
--- Name: contact_inq_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
---
-
-ALTER SEQUENCE contact_inq_id_seq OWNED BY contact_inq.id;
-
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY contact_inq ALTER COLUMN id SET DEFAULT nextval('contact_inq_id_seq'::regclass);
-
-
 --
 -- Data for Name: contact_inq; Type: TABLE DATA; Schema: public; Owner: postgres
 --
@@ -88,34 +42,6 @@ INSERT INTO contact_inq (id, header, pos, description, image) VALUES (29, 'Boati
 SELECT pg_catalog.setval('contact_inq_id_seq', 29, true);
 
 
---
--- Name: contact_inq_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY contact_inq
-    ADD CONSTRAINT contact_inq_pkey PRIMARY KEY (id);
-
-
---
--- Name: contact_inq; Type: ACL; Schema: public; Owner: postgres
---
-
-REVOKE ALL ON TABLE contact_inq FROM PUBLIC;
-REVOKE ALL ON TABLE contact_inq FROM postgres;
-GRANT ALL ON TABLE contact_inq TO postgres;
-GRANT ALL ON TABLE contact_inq TO nobody;
-
-
---
--- Name: contact_inq_id_seq; Type: ACL; Schema: public; Owner: postgres
---
-
-REVOKE ALL ON SEQUENCE contact_inq_id_seq FROM PUBLIC;
-REVOKE ALL ON SEQUENCE contact_inq_id_seq FROM postgres;
-GRANT ALL ON SEQUENCE contact_inq_id_seq TO postgres;
-GRANT ALL ON SEQUENCE contact_inq_id_seq TO nobody;
-
-
 --
 -- PostgreSQL database dump complete
 --
index af0d477..89e7c7f 100644 (file)
@@ -11,33 +11,6 @@ SET escape_string_warning = off;
 
 SET search_path = public, pg_catalog;
 
-SET default_tablespace = '';
-
-SET default_with_oids = true;
-
---
--- Name: news_response; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE news_response (
-    id integer DEFAULT nextval(('"news_response_id_seq"'::text)::regclass) NOT NULL,
-    subject text,
-    response text,
-    mailout date,
-    coupon text,
-    image1 text,
-    image2 text,
-    image3 text,
-    coupon_link text,
-    image text,
-    image_link text,
-    image2_link text,
-    image3_link text
-);
-
-
-ALTER TABLE public.news_response OWNER TO postgres;
-
 --
 -- Data for Name: news_response; Type: TABLE DATA; Schema: public; Owner: postgres
 --
@@ -45,23 +18,6 @@ ALTER TABLE public.news_response OWNER TO postgres;
 INSERT INTO news_response (id, subject, response, mailout, coupon, image1, image2, image3, coupon_link, image, image_link, image2_link, image3_link) VALUES (1, 'Last minute deal!!', '<p style="MARGIN: 0in 0in 0pt" class="MsoNormal" /><p><em></em></p><p>It is incredibly beautiful outside with perfectly blue skies! We want you to come visit with us this weekend to take advantage of a special offer. </p><p>Call us before the end of the day tomorrow (Thursday) and we will give you:</p><ul><li>A FREE Thursday or Sunday night </li><li>20% discount off of the room charge</li><li>Late Checkout...you can tell us what time you would like to leave</li></ul><p>Don''t forget these great reasons to visit us this winter:</p><ul><li>We have discounted lift tickets at Nubs Nob &amp; Boyne</li><li>FREE Shuttle to Nubs Nob on Saturday &amp; Sunday</li><li>Outdoor Pool and Hot Tub</li><li>Fitness Center with indoor pool, hot tub, sauna</li><li>Every condo has a full kitchen- save money and bring food!</li><li>Every condo has a fireplace...either wood burning or gas</li><li>The Customer Service cannot be beat!</li><li>We may not be Ski-In/Ski-Out...but we are right here! The price you pay to stay with us is half the price as other lodging options in our neighborhood.</li></ul><p>It is so great out today! We can''t wait to hear from you!!</p><p>Debby, Dan, Chris and Nikki<br />1-800-748-0245</p>', NULL, '', NULL, '', '', '', '', '', '', '');
 
 
---
--- Name: news_response_id_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE UNIQUE INDEX news_response_id_key ON news_response USING btree (id);
-
-
---
--- Name: news_response; Type: ACL; Schema: public; Owner: postgres
---
-
-REVOKE ALL ON TABLE news_response FROM PUBLIC;
-REVOKE ALL ON TABLE news_response FROM postgres;
-GRANT ALL ON TABLE news_response TO postgres;
-GRANT ALL ON TABLE news_response TO nobody;
-
-
 --
 -- PostgreSQL database dump complete
 --
index e96300c..6d17c14 100644 (file)
@@ -11,25 +11,6 @@ SET escape_string_warning = off;
 
 SET search_path = public, pg_catalog;
 
-SET default_tablespace = '';
-
-SET default_with_oids = true;
-
---
--- Name: query_db; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE query_db (
-    id integer DEFAULT nextval(('"query_db_id_seq"'::text)::regclass) NOT NULL,
-    query_name character varying(8000),
-    query character varying(8000),
-    file character varying(100),
-    delimiter character varying(100)
-);
-
-
-ALTER TABLE public.query_db OWNER TO postgres;
-
 --
 -- Data for Name: query_db; Type: TABLE DATA; Schema: public; Owner: postgres
 --
@@ -44,23 +25,6 @@ INSERT INTO query_db (id, query_name, query, file, delimiter) VALUES (2, '(curre
                          ORDER BY      lname,fname', '', '');
 
 
---
--- Name: query_db_id_key; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE UNIQUE INDEX query_db_id_key ON query_db USING btree (id);
-
-
---
--- Name: query_db; Type: ACL; Schema: public; Owner: postgres
---
-
-REVOKE ALL ON TABLE query_db FROM PUBLIC;
-REVOKE ALL ON TABLE query_db FROM postgres;
-GRANT ALL ON TABLE query_db TO postgres;
-GRANT ALL ON TABLE query_db TO nobody;
-
-
 --
 -- PostgreSQL database dump complete
 --
index f265bfd..a0b08a6 100755 (executable)
@@ -10,6 +10,6 @@ tables[2]=query_db
 tables[3]=news_response
 
 for i in ${tables[@]}; do
-    $pgDump -h $dbHost $dbName -t ${i} -f ./data/${i}.sql
+    $pgDump -h $dbHost $dbName -a -t ${i} -f ./data/${i}.sql
     echo ${i}
 done
index 643f24b..7035002 100644 (file)
@@ -1,6 +1,8 @@
 --
 -- Data
 --
+DELETE FROM contact;
 \i ./data/contact.sql
-\i ./data/contact_inq.sql
+-- DELETE FROM contact_inq;
+-- \i ./data/contact_inq.sql