--
--

\restrict 6OgFigSVYIdeDQacIiatU4Vx8zdDf3V4PSWTT8gMQPywwv77FvACr6QApAVFzaf


SELECT pg_catalog.set_config('search_path', '', false);

DROP INDEX public.idx_16386_pubfor_pubby_pubedition_filename_comment;
DROP INDEX public.idx_16386_browsing;
ALTER TABLE ONLY public.files DROP CONSTRAINT idx_16386_primary;
DROP TABLE public.files;


--
-- Name: files; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.files (
    id bigint DEFAULT nextval('public.files_id_seq'::regclass) NOT NULL,
    uuid character(36) DEFAULT 'UUID()'::bpchar,
    list_relations character varying(255),
    web_id_16colors character varying(1024),
    web_id_github character varying(1024),
    web_id_youtube character(11),
    web_id_pouet bigint,
    web_id_demozoo bigint,
    group_brand_for character varying(100),
    group_brand_by character varying(100),
    record_title character varying(100),
    date_issued_year smallint,
    date_issued_month smallint,
    date_issued_day smallint,
    credit_text character varying(1024),
    credit_program character varying(100),
    credit_illustration character varying(1024),
    credit_audio character varying(100),
    filename character varying(255),
    filesize bigint,
    list_links character varying(2048),
    file_security_alert_url character varying(256),
    file_zip_content text,
    file_magic_type character varying(255),
    preview_image character varying(1024),
    file_integrity_strong character(96),
    file_integrity_weak character(32),
    file_last_modified timestamp with time zone,
    platform character(25),
    section character(25),
    comment text,
    createdat timestamp with time zone,
    updatedat timestamp with time zone,
    deletedat timestamp with time zone,
    updatedby character(36),
    deletedby character(36),
    retrotxt_readme character varying(255),
    retrotxt_no_readme smallint,
    dosee_run_program character varying(255),
    dosee_hardware_cpu character varying(6),
    dosee_hardware_graphic character varying(8),
    dosee_hardware_audio character varying(9),
    dosee_no_aspect_ratio_fix smallint,
    dosee_incompatible smallint,
    dosee_no_ems smallint,
    dosee_no_xms smallint,
    dosee_no_umb smallint,
    dosee_load_utilities smallint
);


--
-- Name: TABLE files; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.files IS 'This database is the complete collection of files for download';


--
-- Name: COLUMN files.id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.id IS 'Primary key';


--
-- Name: COLUMN files.uuid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.uuid IS 'Global identifier';


--
-- Name: COLUMN files.list_relations; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.list_relations IS 'List of associated records';


--
-- Name: COLUMN files.web_id_16colors; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.web_id_16colors IS 'URI for a 16colo.rs page';


--
-- Name: COLUMN files.web_id_github; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.web_id_github IS 'Id for a GitHub repository';


--
-- Name: COLUMN files.web_id_youtube; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.web_id_youtube IS 'Id for a related YouTube video';


--
-- Name: COLUMN files.web_id_pouet; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.web_id_pouet IS 'Id for a Pouët record';


--
-- Name: COLUMN files.web_id_demozoo; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.web_id_demozoo IS 'Id for a Demozoo record';


--
-- Name: COLUMN files.group_brand_for; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.group_brand_for IS 'Group or brand used to credit the file';


--
-- Name: COLUMN files.group_brand_by; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.group_brand_by IS 'Optional alternative Group or brand used to credit the file';


--
-- Name: COLUMN files.record_title; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.record_title IS 'Display title or magazine edition';


--
-- Name: COLUMN files.date_issued_year; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.date_issued_year IS 'Published date year';


--
-- Name: COLUMN files.date_issued_month; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.date_issued_month IS 'Published date month';


--
-- Name: COLUMN files.date_issued_day; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.date_issued_day IS 'Published date day';


--
-- Name: COLUMN files.credit_text; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.credit_text IS 'Writing credits';


--
-- Name: COLUMN files.credit_program; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.credit_program IS 'Programming credits';


--
-- Name: COLUMN files.credit_illustration; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.credit_illustration IS 'Artist credits';


--
-- Name: COLUMN files.credit_audio; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.credit_audio IS 'Composer credits';


--
-- Name: COLUMN files.filename; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.filename IS 'File name';


--
-- Name: COLUMN files.filesize; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.filesize IS 'Size of the file in bytes';


--
-- Name: COLUMN files.list_links; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.list_links IS 'List of URLs related to this file';


--
-- Name: COLUMN files.file_security_alert_url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.file_security_alert_url IS 'URL showing results of a virus scan';


--
-- Name: COLUMN files.file_zip_content; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.file_zip_content IS 'Content of archive';


--
-- Name: COLUMN files.file_magic_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.file_magic_type IS 'File type meta data';


--
-- Name: COLUMN files.preview_image; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.preview_image IS 'Internal file to use as a screenshot';


--
-- Name: COLUMN files.file_integrity_strong; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.file_integrity_strong IS 'SHA384 hash of file';


--
-- Name: COLUMN files.file_integrity_weak; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.file_integrity_weak IS 'MD5 hash of file';


--
-- Name: COLUMN files.file_last_modified; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.file_last_modified IS 'Date last modified attribute saved to file';


--
-- Name: COLUMN files.platform; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.platform IS 'Computer platform';


--
-- Name: COLUMN files.section; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.section IS 'Category';


--
-- Name: COLUMN files.comment; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.comment IS 'Description';


--
-- Name: COLUMN files.createdat; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.createdat IS 'Timestamp when record was created';


--
-- Name: COLUMN files.updatedat; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.updatedat IS 'Timestamp when record was revised';


--
-- Name: COLUMN files.deletedat; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.deletedat IS 'Timestamp used to ignore record';


--
-- Name: COLUMN files.updatedby; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.updatedby IS 'UUID of the user who last updated this record';


--
-- Name: COLUMN files.deletedby; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.deletedby IS 'UUID of the user who removed this record';


--
-- Name: COLUMN files.retrotxt_readme; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.retrotxt_readme IS 'Text file contained in archive to display';


--
-- Name: COLUMN files.retrotxt_no_readme; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.retrotxt_no_readme IS 'Disable the use of RetroTxt';


--
-- Name: COLUMN files.dosee_run_program; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_run_program IS 'Program contained in archive to run in DOSBox';


--
-- Name: COLUMN files.dosee_hardware_cpu; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_hardware_cpu IS 'DOSee turn off expanded memory (EMS)';


--
-- Name: COLUMN files.dosee_hardware_graphic; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_hardware_graphic IS 'DOSee graphics/machine override';


--
-- Name: COLUMN files.dosee_hardware_audio; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_hardware_audio IS 'DOSee audio override';


--
-- Name: COLUMN files.dosee_no_aspect_ratio_fix; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_no_aspect_ratio_fix IS 'DOSee disable aspect ratio corrections';


--
-- Name: COLUMN files.dosee_incompatible; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_incompatible IS 'Flag DOS program as incompatible for DOSBox';


--
-- Name: COLUMN files.dosee_no_ems; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_no_ems IS 'DOSBox turn off EMS';


--
-- Name: COLUMN files.dosee_no_xms; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_no_xms IS 'DOSee turn off extended memory (XMS)';


--
-- Name: COLUMN files.dosee_no_umb; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_no_umb IS 'DOSee turn off upper memory block access (UMB)';


--
-- Name: COLUMN files.dosee_load_utilities; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.files.dosee_load_utilities IS 'DOSee load utilities';




--
-- Name: files idx_16386_primary; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.files
    ADD CONSTRAINT idx_16386_primary PRIMARY KEY (id);


--
-- Name: idx_16386_browsing; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX idx_16386_browsing ON public.files USING btree (date_issued_year, date_issued_month, date_issued_day, section, platform, filename, createdat);


--
-- Name: idx_16386_pubfor_pubby_pubedition_filename_comment; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX idx_16386_pubfor_pubby_pubedition_filename_comment ON public.files USING btree (group_brand_for, group_brand_by, record_title, filename, comment);


--
--

\unrestrict 6OgFigSVYIdeDQacIiatU4Vx8zdDf3V4PSWTT8gMQPywwv77FvACr6QApAVFzaf

