Revision 6304
Added by Aaron Marcuse-Kubitza about 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1200 | 1200 |
accessconditions text, |
1201 | 1201 |
title text, |
1202 | 1202 |
titlesuperior text, |
1203 |
sourcejournal_id int(11), |
|
1204 | 1203 |
volume text, |
1205 | 1204 |
issue text, |
1206 | 1205 |
pagerange text, |
... | ... | |
2730 | 2729 |
|
2731 | 2730 |
|
2732 | 2731 |
-- |
2733 |
-- Name: sourcejournal; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
2734 |
-- |
|
2735 |
|
|
2736 |
CREATE TABLE sourcejournal ( |
|
2737 |
sourcejournal_id int(11) NOT NULL, |
|
2738 |
journal text NOT NULL, |
|
2739 |
issn text, |
|
2740 |
abbreviation text, |
|
2741 |
accessioncode text |
|
2742 |
); |
|
2743 |
|
|
2744 |
|
|
2745 |
-- |
|
2746 |
-- Name: sourcejournal_sourcejournal_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
2747 |
-- |
|
2748 |
|
|
2749 |
|
|
2750 |
|
|
2751 |
|
|
2752 |
-- |
|
2753 |
-- Name: sourcejournal_sourcejournal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
2754 |
-- |
|
2755 |
|
|
2756 |
|
|
2757 |
|
|
2758 |
|
|
2759 |
-- |
|
2760 |
-- Name: sourcejournal_sourcejournal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - |
|
2761 |
-- |
|
2762 |
|
|
2763 |
|
|
2764 |
|
|
2765 |
-- |
|
2766 | 2732 |
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace: |
2767 | 2733 |
-- |
2768 | 2734 |
|
... | ... | |
3655 | 3621 |
|
3656 | 3622 |
|
3657 | 3623 |
-- |
3658 |
-- Name: sourcejournal_id; Type: DEFAULT; Schema: public; Owner: - |
|
3659 |
-- |
|
3660 |
|
|
3661 |
|
|
3662 |
|
|
3663 |
|
|
3664 |
-- |
|
3665 | 3624 |
-- Name: sourcename_id; Type: DEFAULT; Schema: public; Owner: - |
3666 | 3625 |
-- |
3667 | 3626 |
|
... | ... | |
4070 | 4029 |
|
4071 | 4030 |
|
4072 | 4031 |
-- |
4073 |
-- Data for Name: sourcejournal; Type: TABLE DATA; Schema: public; Owner: - |
|
4074 |
-- |
|
4075 |
|
|
4076 |
|
|
4077 |
|
|
4078 |
-- |
|
4079 | 4032 |
-- Data for Name: sourcename; Type: TABLE DATA; Schema: public; Owner: - |
4080 | 4033 |
-- |
4081 | 4034 |
|
... | ... | |
4596 | 4549 |
|
4597 | 4550 |
|
4598 | 4551 |
-- |
4599 |
-- Name: sourcejournal_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4600 |
-- |
|
4601 |
|
|
4602 |
ALTER TABLE sourcejournal |
|
4603 |
ADD CONSTRAINT sourcejournal_pkey PRIMARY KEY (sourcejournal_id); |
|
4604 |
|
|
4605 |
|
|
4606 |
-- |
|
4607 | 4552 |
-- Name: sourcename_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4608 | 4553 |
-- |
4609 | 4554 |
|
... | ... | |
5090 | 5035 |
|
5091 | 5036 |
|
5092 | 5037 |
-- |
5093 |
-- Name: sourcejournal_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5094 |
-- |
|
5095 |
|
|
5096 |
CREATE UNIQUE INDEX sourcejournal_accessioncode_index ON sourcejournal (accessioncode); |
|
5097 |
|
|
5098 |
|
|
5099 |
-- |
|
5100 | 5038 |
-- Name: sourcename_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5101 | 5039 |
-- |
5102 | 5040 |
|
... | ... | |
5999 | 5937 |
|
6000 | 5938 |
|
6001 | 5939 |
-- |
6002 |
-- Name: source_sourcejournal_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6003 |
-- |
|
6004 |
|
|
6005 |
ALTER TABLE source |
|
6006 |
ADD CONSTRAINT source_sourcejournal_id_fkey FOREIGN KEY (sourcejournal_id) REFERENCES sourcejournal(sourcejournal_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6007 |
|
|
6008 |
|
|
6009 |
-- |
|
6010 | 5940 |
-- Name: sourcecontributor_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
6011 | 5941 |
-- |
6012 | 5942 |
|
schemas/vegbien.sql | ||
---|---|---|
1897 | 1897 |
accessconditions text, |
1898 | 1898 |
title text, |
1899 | 1899 |
titlesuperior text, |
1900 |
sourcejournal_id integer, |
|
1901 | 1900 |
volume text, |
1902 | 1901 |
issue text, |
1903 | 1902 |
pagerange text, |
... | ... | |
3633 | 3632 |
|
3634 | 3633 |
|
3635 | 3634 |
-- |
3636 |
-- Name: sourcejournal; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
3637 |
-- |
|
3638 |
|
|
3639 |
CREATE TABLE sourcejournal ( |
|
3640 |
sourcejournal_id integer NOT NULL, |
|
3641 |
journal text NOT NULL, |
|
3642 |
issn text, |
|
3643 |
abbreviation text, |
|
3644 |
accessioncode text |
|
3645 |
); |
|
3646 |
|
|
3647 |
|
|
3648 |
-- |
|
3649 |
-- Name: sourcejournal_sourcejournal_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
3650 |
-- |
|
3651 |
|
|
3652 |
CREATE SEQUENCE sourcejournal_sourcejournal_id_seq |
|
3653 |
START WITH 1 |
|
3654 |
INCREMENT BY 1 |
|
3655 |
NO MINVALUE |
|
3656 |
NO MAXVALUE |
|
3657 |
CACHE 1; |
|
3658 |
|
|
3659 |
|
|
3660 |
-- |
|
3661 |
-- Name: sourcejournal_sourcejournal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
3662 |
-- |
|
3663 |
|
|
3664 |
ALTER SEQUENCE sourcejournal_sourcejournal_id_seq OWNED BY sourcejournal.sourcejournal_id; |
|
3665 |
|
|
3666 |
|
|
3667 |
-- |
|
3668 |
-- Name: sourcejournal_sourcejournal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - |
|
3669 |
-- |
|
3670 |
|
|
3671 |
|
|
3672 |
|
|
3673 |
-- |
|
3674 | 3635 |
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace: |
3675 | 3636 |
-- |
3676 | 3637 |
|
... | ... | |
4658 | 4619 |
|
4659 | 4620 |
|
4660 | 4621 |
-- |
4661 |
-- Name: sourcejournal_id; Type: DEFAULT; Schema: public; Owner: - |
|
4662 |
-- |
|
4663 |
|
|
4664 |
ALTER TABLE ONLY sourcejournal ALTER COLUMN sourcejournal_id SET DEFAULT nextval('sourcejournal_sourcejournal_id_seq'::regclass); |
|
4665 |
|
|
4666 |
|
|
4667 |
-- |
|
4668 | 4622 |
-- Name: sourcename_id; Type: DEFAULT; Schema: public; Owner: - |
4669 | 4623 |
-- |
4670 | 4624 |
|
... | ... | |
5073 | 5027 |
|
5074 | 5028 |
|
5075 | 5029 |
-- |
5076 |
-- Data for Name: sourcejournal; Type: TABLE DATA; Schema: public; Owner: - |
|
5077 |
-- |
|
5078 |
|
|
5079 |
|
|
5080 |
|
|
5081 |
-- |
|
5082 | 5030 |
-- Data for Name: sourcename; Type: TABLE DATA; Schema: public; Owner: - |
5083 | 5031 |
-- |
5084 | 5032 |
|
... | ... | |
5599 | 5547 |
|
5600 | 5548 |
|
5601 | 5549 |
-- |
5602 |
-- Name: sourcejournal_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
5603 |
-- |
|
5604 |
|
|
5605 |
ALTER TABLE ONLY sourcejournal |
|
5606 |
ADD CONSTRAINT sourcejournal_pkey PRIMARY KEY (sourcejournal_id); |
|
5607 |
|
|
5608 |
|
|
5609 |
-- |
|
5610 | 5550 |
-- Name: sourcename_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
5611 | 5551 |
-- |
5612 | 5552 |
|
... | ... | |
6093 | 6033 |
|
6094 | 6034 |
|
6095 | 6035 |
-- |
6096 |
-- Name: sourcejournal_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
6097 |
-- |
|
6098 |
|
|
6099 |
CREATE UNIQUE INDEX sourcejournal_accessioncode_index ON sourcejournal USING btree (accessioncode); |
|
6100 |
|
|
6101 |
|
|
6102 |
-- |
|
6103 | 6036 |
-- Name: sourcename_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: |
6104 | 6037 |
-- |
6105 | 6038 |
|
... | ... | |
7032 | 6965 |
|
7033 | 6966 |
|
7034 | 6967 |
-- |
7035 |
-- Name: source_sourcejournal_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
7036 |
-- |
|
7037 |
|
|
7038 |
ALTER TABLE ONLY source |
|
7039 |
ADD CONSTRAINT source_sourcejournal_id_fkey FOREIGN KEY (sourcejournal_id) REFERENCES sourcejournal(sourcejournal_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
7040 |
|
|
7041 |
|
|
7042 |
-- |
|
7043 | 6968 |
-- Name: sourcecontributor_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
7044 | 6969 |
-- |
7045 | 6970 |
|
Also available in: Unified diff
schemas/vegbien.sql: Removed no longer needed sourcejournal, which can be stored in source and pointed to via parent_id instead of sourcejournal_id. sourcejournal.journal maps to source.fulltext, issn to isbn, and abbreviation to shortname.