Project

General

Profile

« Previous | Next » 

Revision 906

vegbien.sql: Added locationdetermination.identifier_id

View differences:

vegbien.my.sql
998 998

  
999 999

  
1000 1000
--
1001
-- Name: locationdetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1002
--
1003

  
1004
CREATE TABLE locationdetermination (
1005
    locationdetermination_id int(11) NOT NULL,
1006
    location_id int(11) NOT NULL,
1007
    calculated int(1),
1008
    namedplace_id int(11) NOT NULL,
1009
    identifier_id int(11)
1010
);
1011

  
1012

  
1013
--
1014
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1015
--
1016

  
1017

  
1018

  
1019

  
1020
--
1021
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1022
--
1023

  
1024

  
1025

  
1026

  
1027
--
1001 1028
-- Name: locationevent; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1002 1029
--
1003 1030

  
......
1184 1211

  
1185 1212

  
1186 1213
--
1187
-- Name: locationdetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1188
--
1189

  
1190
CREATE TABLE locationdetermination (
1191
    locationdetermination_id int(11) NOT NULL,
1192
    location_id int(11) NOT NULL,
1193
    calculated int(1),
1194
    namedplace_id int(11) NOT NULL
1195
);
1196

  
1197

  
1198
--
1199
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1200
--
1201

  
1202

  
1203

  
1204

  
1205
--
1206
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1207
--
1208

  
1209

  
1210

  
1211

  
1212
--
1213 1214
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1214 1215
--
1215 1216

  
......
3136 3137

  
3137 3138

  
3138 3139
--
3139
-- Name: locationevent_id; Type: DEFAULT; Schema: public; Owner: -
3140
-- Name: locationdetermination_id; Type: DEFAULT; Schema: public; Owner: -
3140 3141
--
3141 3142

  
3142 3143

  
3143 3144

  
3144 3145

  
3145 3146
--
3146
-- Name: locationeventcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3147
-- Name: locationevent_id; Type: DEFAULT; Schema: public; Owner: -
3147 3148
--
3148 3149

  
3149 3150

  
3150 3151

  
3151 3152

  
3152 3153
--
3153
-- Name: locationeventsynonym_id; Type: DEFAULT; Schema: public; Owner: -
3154
-- Name: locationeventcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3154 3155
--
3155 3156

  
3156 3157

  
3157 3158

  
3158 3159

  
3159 3160
--
3160
-- Name: locationdetermination_id; Type: DEFAULT; Schema: public; Owner: -
3161
-- Name: locationeventsynonym_id; Type: DEFAULT; Schema: public; Owner: -
3161 3162
--
3162 3163

  
3163 3164

  
......
3846 3847

  
3847 3848

  
3848 3849
--
3850
-- Name: locationdetermination_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3851
--
3852

  
3853
ALTER TABLE locationdetermination
3854
    ADD CONSTRAINT locationdetermination_keys UNIQUE (location_id, namedplace_id);
3855

  
3856

  
3857
--
3858
-- Name: locationdetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3859
--
3860

  
3861
ALTER TABLE locationdetermination
3862
    ADD CONSTRAINT locationdetermination_pkey PRIMARY KEY (locationdetermination_id);
3863

  
3864

  
3865
--
3849 3866
-- Name: locationevent_keys_accessioncode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3850 3867
--
3851 3868

  
......
3886 3903

  
3887 3904

  
3888 3905
--
3889
-- Name: locationdetermination_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3890
--
3891

  
3892
ALTER TABLE locationdetermination
3893
    ADD CONSTRAINT locationdetermination_keys UNIQUE (location_id, namedplace_id);
3894

  
3895

  
3896
--
3897
-- Name: locationdetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3898
--
3899

  
3900
ALTER TABLE locationdetermination
3901
    ADD CONSTRAINT locationdetermination_pkey PRIMARY KEY (locationdetermination_id);
3902

  
3903

  
3904
--
3905 3906
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3906 3907
--
3907 3908

  
......
4815 4816

  
4816 4817

  
4817 4818
--
4819
-- Name: fki_locationdetermination_identifier_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4820
--
4821

  
4822
CREATE INDEX fki_locationdetermination_identifier_id ON locationdetermination  (identifier_id);
4823

  
4824

  
4825
--
4818 4826
-- Name: fki_locationevent_plotmethod_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4819 4827
--
4820 4828

  
......
4934 4942

  
4935 4943

  
4936 4944
--
4945
-- Name: locationdetermination_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4946
--
4947

  
4948
CREATE INDEX locationdetermination_location_id_x ON locationdetermination  (location_id);
4949

  
4950

  
4951
--
4952
-- Name: locationdetermination_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4953
--
4954

  
4955
CREATE INDEX locationdetermination_namedplace_id_x ON locationdetermination  (namedplace_id);
4956

  
4957

  
4958
--
4937 4959
-- Name: locationevent_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4938 4960
--
4939 4961

  
......
5032 5054

  
5033 5055

  
5034 5056
--
5035
-- Name: locationdetermination_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5036
--
5037

  
5038
CREATE INDEX locationdetermination_location_id_x ON locationdetermination  (location_id);
5039

  
5040

  
5041
--
5042
-- Name: locationdetermination_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5043
--
5044

  
5045
CREATE INDEX locationdetermination_namedplace_id_x ON locationdetermination  (namedplace_id);
5046

  
5047

  
5048
--
5049 5057
-- Name: namedplace_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5050 5058
--
5051 5059

  
......
5990 5998

  
5991 5999

  
5992 6000
--
6001
-- Name: locationdetermination_identifier_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6002
--
6003

  
6004

  
6005

  
6006

  
6007
--
6008
-- Name: locationdetermination_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6009
--
6010

  
6011
ALTER TABLE locationdetermination
6012
    ADD CONSTRAINT locationdetermination_location_id FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
6013

  
6014

  
6015
--
6016
-- Name: locationdetermination_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6017
--
6018

  
6019
ALTER TABLE locationdetermination
6020
    ADD CONSTRAINT locationdetermination_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6021

  
6022

  
6023
--
5993 6024
-- Name: locationevent_covermethod_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5994 6025
--
5995 6026

  
......
6092 6123

  
6093 6124

  
6094 6125
--
6095
-- Name: locationdetermination_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6096
--
6097

  
6098
ALTER TABLE locationdetermination
6099
    ADD CONSTRAINT locationdetermination_location_id FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
6100

  
6101

  
6102
--
6103
-- Name: locationdetermination_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6104
--
6105

  
6106
ALTER TABLE locationdetermination
6107
    ADD CONSTRAINT locationdetermination_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6108

  
6109

  
6110
--
6111 6126
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6112 6127
--
6113 6128

  

Also available in: Unified diff