Revision 10796
Added by Aaron Marcuse-Kubitza about 11 years ago
vegbien.my.sql | ||
---|---|---|
318 | 318 |
|
319 | 319 |
|
320 | 320 |
|
321 |
|
|
322 |
|
|
323 |
|
|
324 |
|
|
321 | 325 |
-- |
322 |
-- Name: delete_scrubbed_taxondeterminations(varchar(255)); Type: FUNCTION; Schema: public; Owner: -
|
|
326 |
-- Name: source; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
|
323 | 327 |
-- |
324 | 328 |
|
329 |
CREATE TABLE source ( |
|
330 |
source_id int(11) NOT NULL, |
|
331 |
matched_source_id int(11), |
|
332 |
parent_id int(11), |
|
333 |
shortname varchar(255) NOT NULL, |
|
334 |
citation varchar(255), |
|
335 |
sourcetype varchar(255), |
|
336 |
accesslevel varchar(255), |
|
337 |
accessconditions varchar(255), |
|
338 |
observationtype varchar(255), |
|
339 |
title varchar(255), |
|
340 |
titlesuperior varchar(255), |
|
341 |
volume varchar(255), |
|
342 |
issue varchar(255), |
|
343 |
pagerange varchar(255), |
|
344 |
totalpages int(11), |
|
345 |
publisher varchar(255), |
|
346 |
publicationplace varchar(255), |
|
347 |
isbn varchar(255), |
|
348 |
edition varchar(255), |
|
349 |
numberofvolumes int(11), |
|
350 |
chapternumber int(11), |
|
351 |
reportnumber int(11), |
|
352 |
communicationtype varchar(255), |
|
353 |
degree varchar(255), |
|
354 |
url varchar(255), |
|
355 |
doi varchar(255), |
|
356 |
additionalinfo varchar(255), |
|
357 |
pubdate date, |
|
358 |
accessdate date, |
|
359 |
conferencedate date, |
|
360 |
datecreated date NOT NULL, |
|
361 |
createdby varchar(255), |
|
362 |
datelastmodified date NOT NULL, |
|
363 |
lastmodifiedby varchar(255), |
|
364 |
import_revision varchar(255) |
|
365 |
); |
|
325 | 366 |
|
326 | 367 |
|
368 |
-- |
|
369 |
-- Name: datasource_rm(varchar(255), anyelement); Type: FUNCTION; Schema: public; Owner: - |
|
370 |
-- |
|
327 | 371 |
|
372 |
|
|
373 |
|
|
374 |
|
|
328 | 375 |
-- |
329 |
-- Name: make_family_higher_plant_group(); Type: FUNCTION; Schema: public; Owner: -
|
|
376 |
-- Name: FUNCTION datasource_rm(datasource varchar(255), schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
|
|
330 | 377 |
-- |
331 | 378 |
|
332 | 379 |
|
333 | 380 |
|
334 | 381 |
|
335 | 382 |
-- |
336 |
-- Name: party_source_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
|
|
383 |
-- Name: delete_scrubbed_taxondeterminations(varchar(255)); Type: FUNCTION; Schema: public; Owner: -
|
|
337 | 384 |
-- |
338 | 385 |
|
339 | 386 |
|
340 | 387 |
|
341 | 388 |
|
342 | 389 |
-- |
343 |
-- Name: place_matched_place_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
|
|
390 |
-- Name: make_family_higher_plant_group(); Type: FUNCTION; Schema: public; Owner: -
|
|
344 | 391 |
-- |
345 | 392 |
|
346 | 393 |
|
347 | 394 |
|
348 | 395 |
|
396 |
-- |
|
397 |
-- Name: party_source_id_self_ref(); Type: FUNCTION; Schema: public; Owner: - |
|
398 |
-- |
|
349 | 399 |
|
350 | 400 |
|
351 | 401 |
|
352 | 402 |
|
353 | 403 |
-- |
404 |
-- Name: place_matched_place_id_self_ref(); Type: FUNCTION; Schema: public; Owner: - |
|
405 |
-- |
|
406 |
|
|
407 |
|
|
408 |
|
|
409 |
|
|
410 |
-- |
|
354 | 411 |
-- Name: place; Type: TABLE; Schema: public; Owner: -; Tablespace: |
355 | 412 |
-- |
356 | 413 |
|
... | ... | |
1280 | 1337 |
|
1281 | 1338 |
|
1282 | 1339 |
-- |
1283 |
-- Name: source; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1284 |
-- |
|
1285 |
|
|
1286 |
CREATE TABLE source ( |
|
1287 |
source_id int(11) NOT NULL, |
|
1288 |
matched_source_id int(11), |
|
1289 |
parent_id int(11), |
|
1290 |
shortname varchar(255) NOT NULL, |
|
1291 |
citation varchar(255), |
|
1292 |
sourcetype varchar(255), |
|
1293 |
accesslevel varchar(255), |
|
1294 |
accessconditions varchar(255), |
|
1295 |
observationtype varchar(255), |
|
1296 |
title varchar(255), |
|
1297 |
titlesuperior varchar(255), |
|
1298 |
volume varchar(255), |
|
1299 |
issue varchar(255), |
|
1300 |
pagerange varchar(255), |
|
1301 |
totalpages int(11), |
|
1302 |
publisher varchar(255), |
|
1303 |
publicationplace varchar(255), |
|
1304 |
isbn varchar(255), |
|
1305 |
edition varchar(255), |
|
1306 |
numberofvolumes int(11), |
|
1307 |
chapternumber int(11), |
|
1308 |
reportnumber int(11), |
|
1309 |
communicationtype varchar(255), |
|
1310 |
degree varchar(255), |
|
1311 |
url varchar(255), |
|
1312 |
doi varchar(255), |
|
1313 |
additionalinfo varchar(255), |
|
1314 |
pubdate date, |
|
1315 |
accessdate date, |
|
1316 |
conferencedate date, |
|
1317 |
datecreated date NOT NULL, |
|
1318 |
createdby varchar(255), |
|
1319 |
datelastmodified date NOT NULL, |
|
1320 |
lastmodifiedby varchar(255), |
|
1321 |
import_revision varchar(255) |
|
1322 |
); |
|
1323 |
|
|
1324 |
|
|
1325 |
-- |
|
1326 | 1340 |
-- Name: sourcelist; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1327 | 1341 |
-- |
1328 | 1342 |
|
... | ... | |
7166 | 7180 |
|
7167 | 7181 |
|
7168 | 7182 |
-- |
7183 |
-- Name: source; Type: ACL; Schema: public; Owner: - |
|
7184 |
-- |
|
7185 |
|
|
7186 |
|
|
7187 |
|
|
7188 |
|
|
7189 |
|
|
7190 |
|
|
7191 |
|
|
7192 |
|
|
7193 |
-- |
|
7169 | 7194 |
-- Name: place; Type: ACL; Schema: public; Owner: - |
7170 | 7195 |
-- |
7171 | 7196 |
|
... | ... | |
7337 | 7362 |
|
7338 | 7363 |
|
7339 | 7364 |
-- |
7340 |
-- Name: source; Type: ACL; Schema: public; Owner: - |
|
7341 |
-- |
|
7342 |
|
|
7343 |
|
|
7344 |
|
|
7345 |
|
|
7346 |
|
|
7347 |
|
|
7348 |
|
|
7349 |
|
|
7350 |
-- |
|
7351 | 7365 |
-- Name: sourcelist; Type: ACL; Schema: public; Owner: - |
7352 | 7366 |
-- |
7353 | 7367 |
|
Also available in: Unified diff
schemas/vegbien.sql: added datasource_rm(). this uses an internal schema-scoping parameter to ensure that the function always operates on tables in the schema it was defined in, rather than tables in the search_path. this ensures that when the public schema is renamed (e.g. from an imported version), the function will continue to operate on its own schema rather than whichever schema happens to be called public. this avoids any surprises if you are trying to remove a datasource in one schema, and don't want it to unintentionally be removed in another schema instead.