Project

General

Profile

« Previous | Next » 

Revision 6296

schemas/vegbien.sql: source: Added parent_id for nested sources, e.g. an article in a journal

View differences:

schemas/vegbien.my.sql
1191 1191

  
1192 1192
CREATE TABLE source (
1193 1193
    source_id int(11) NOT NULL,
1194
    parent_id int(11),
1194 1195
    shortname text,
1195 1196
    `fulltext` text,
1196 1197
    sourcetype text,
......
5981 5982

  
5982 5983

  
5983 5984
--
5985
-- Name: source_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5986
--
5987

  
5988
ALTER TABLE source
5989
    ADD CONSTRAINT source_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES source(source_id) ON UPDATE CASCADE ON DELETE CASCADE;
5990

  
5991

  
5992
--
5984 5993
-- Name: source_sourcejournal_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5985 5994
--
5986 5995

  
schemas/vegbien.sql
1888 1888

  
1889 1889
CREATE TABLE source (
1890 1890
    source_id integer NOT NULL,
1891
    parent_id integer,
1891 1892
    shortname text,
1892 1893
    fulltext text,
1893 1894
    sourcetype sourcetype,
......
7014 7015

  
7015 7016

  
7016 7017
--
7018
-- Name: source_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
7019
--
7020

  
7021
ALTER TABLE ONLY source
7022
    ADD CONSTRAINT source_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES source(source_id) ON UPDATE CASCADE ON DELETE CASCADE;
7023

  
7024

  
7025
--
7017 7026
-- Name: source_sourcejournal_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
7018 7027
--
7019 7028

  

Also available in: Unified diff