1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-08-17 15:19:48 +00:00

Add column 'type' to sets and take its value on command line.

This commit is contained in:
King_DuckZ 2015-11-11 20:06:14 +00:00
parent 585c7f45b7
commit 911da3bb00
9 changed files with 78 additions and 25 deletions

View file

@ -4,7 +4,7 @@
-- Dumped from database version 9.4.5
-- Dumped by pg_dump version 9.4.5
-- Started on 2015-11-11 13:26:58 GMT
-- Started on 2015-11-11 20:03:40 GMT
SET statement_timeout = 0;
SET lock_timeout = 0;
@ -22,7 +22,7 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 2035 (class 0 OID 0)
-- TOC entry 2037 (class 0 OID 0)
-- Dependencies: 178
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
@ -90,7 +90,7 @@ CREATE SEQUENCE files_id_seq
ALTER TABLE files_id_seq OWNER TO @USERNAME@;
--
-- TOC entry 2036 (class 0 OID 0)
-- TOC entry 2038 (class 0 OID 0)
-- Dependencies: 174
-- Name: files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: @USERNAME@
--
@ -106,12 +106,29 @@ ALTER SEQUENCE files_id_seq OWNED BY files.id;
CREATE TABLE sets (
id integer NOT NULL,
"desc" text NOT NULL,
creation time with time zone DEFAULT now() NOT NULL
creation time with time zone DEFAULT now() NOT NULL,
type character(1) DEFAULT 'D'::bpchar NOT NULL,
CONSTRAINT chk_sets_type CHECK ((((((((type = 'D'::bpchar) OR (type = 'V'::bpchar)) OR (type = 'B'::bpchar)) OR (type = 'F'::bpchar)) OR (type = 'H'::bpchar)) OR (type = 'Z'::bpchar)) OR (type = 'O'::bpchar)))
);
ALTER TABLE sets OWNER TO @USERNAME@;
--
-- TOC entry 2039 (class 0 OID 0)
-- Dependencies: 177
-- Name: COLUMN sets.type; Type: COMMENT; Schema: public; Owner: @USERNAME@
--
COMMENT ON COLUMN sets.type IS 'D = directory
V = DVD
B = BluRay
F = Floppy Disk
H = Hard Disk
Z = Iomega Zip
O = Other';
--
-- TOC entry 176 (class 1259 OID 31409)
-- Name: sets_id_seq; Type: SEQUENCE; Schema: public; Owner: @USERNAME@
@ -128,7 +145,7 @@ CREATE SEQUENCE sets_id_seq
ALTER TABLE sets_id_seq OWNER TO @USERNAME@;
--
-- TOC entry 2037 (class 0 OID 0)
-- TOC entry 2040 (class 0 OID 0)
-- Dependencies: 176
-- Name: sets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: @USERNAME@
--
@ -153,7 +170,7 @@ ALTER TABLE ONLY sets ALTER COLUMN id SET DEFAULT nextval('sets_id_seq'::regclas
--
-- TOC entry 1912 (class 2606 OID 31289)
-- TOC entry 1914 (class 2606 OID 31289)
-- Name: pk_files_id; Type: CONSTRAINT; Schema: public; Owner: @USERNAME@; Tablespace:
--
@ -162,7 +179,7 @@ ALTER TABLE ONLY files
--
-- TOC entry 1916 (class 2606 OID 31420)
-- TOC entry 1918 (class 2606 OID 31420)
-- Name: pk_sets_id; Type: CONSTRAINT; Schema: public; Owner: @USERNAME@; Tablespace:
--
@ -171,7 +188,7 @@ ALTER TABLE ONLY sets
--
-- TOC entry 1914 (class 2606 OID 31294)
-- TOC entry 1916 (class 2606 OID 31294)
-- Name: uniq_item; Type: CONSTRAINT; Schema: public; Owner: @USERNAME@; Tablespace:
--
@ -180,7 +197,7 @@ ALTER TABLE ONLY files
--
-- TOC entry 1909 (class 1259 OID 31426)
-- TOC entry 1911 (class 1259 OID 31426)
-- Name: fki_files_sets; Type: INDEX; Schema: public; Owner: @USERNAME@; Tablespace:
--
@ -188,7 +205,7 @@ CREATE INDEX fki_files_sets ON files USING btree (group_id);
--
-- TOC entry 1910 (class 1259 OID 31292)
-- TOC entry 1912 (class 1259 OID 31292)
-- Name: idx_paths; Type: INDEX; Schema: public; Owner: @USERNAME@; Tablespace:
--
@ -196,7 +213,7 @@ CREATE INDEX idx_paths ON files USING btree (path);
--
-- TOC entry 1918 (class 2620 OID 31291)
-- TOC entry 1920 (class 2620 OID 31291)
-- Name: triggerupcasehash; Type: TRIGGER; Schema: public; Owner: @USERNAME@
--
@ -204,7 +221,7 @@ CREATE TRIGGER triggerupcasehash BEFORE INSERT OR UPDATE ON files FOR EACH ROW E
--
-- TOC entry 1917 (class 2606 OID 31421)
-- TOC entry 1919 (class 2606 OID 31421)
-- Name: fk_files_sets; Type: FK CONSTRAINT; Schema: public; Owner: @USERNAME@
--
@ -213,7 +230,7 @@ ALTER TABLE ONLY files
--
-- TOC entry 2034 (class 0 OID 0)
-- TOC entry 2036 (class 0 OID 0)
-- Dependencies: 8
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
@ -224,7 +241,7 @@ GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
-- Completed on 2015-11-11 13:27:00 GMT
-- Completed on 2015-11-11 20:03:45 GMT
--
-- PostgreSQL database dump complete