Project

General

Profile

« Previous | Next » 

Revision 5286

schemas/vegbien.sql: Renamed plant* taxonomic tables -> taxon*, as part of the taxonomic schema refactoring at <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/2012-10-03_conference_call#Taxonomic-schema-refactoring>

View differences:

vegbien.my.sql
1860 1860

  
1861 1861

  
1862 1862
--
1863
-- Name: plantcorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1864
--
1865

  
1866
CREATE TABLE plantcorrelation (
1867
    plantcorrelation_id int(11) NOT NULL,
1868
    plantstatus_id int(11) NOT NULL,
1869
    taxonconcept_id int(11) NOT NULL,
1870
    plantconvergence text NOT NULL,
1871
    correlationstart timestamp NOT NULL,
1872
    correlationstop timestamp NULL
1873
);
1874

  
1875

  
1876
--
1877
-- Name: plantcorrelation_plantcorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1878
--
1879

  
1880

  
1881

  
1882

  
1883
--
1884
-- Name: plantcorrelation_plantcorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1885
--
1886

  
1887

  
1888

  
1889

  
1890
--
1891
-- Name: plantlineage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1892
--
1893

  
1894
CREATE TABLE plantlineage (
1895
    plantlineage_id int(11) NOT NULL,
1896
    childplantstatus_id int(11) NOT NULL,
1897
    parentplantstatus_id int(11) NOT NULL
1898
);
1899

  
1900

  
1901
--
1902
-- Name: plantlineage_plantlineage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1903
--
1904

  
1905

  
1906

  
1907

  
1908
--
1909
-- Name: plantlineage_plantlineage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1910
--
1911

  
1912

  
1913

  
1914

  
1915
--
1916 1863
-- Name: plantobservation_plantobservation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1917 1864
--
1918 1865

  
......
1927 1874

  
1928 1875

  
1929 1876
--
1930
-- Name: plantstatus; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1931
--
1932

  
1933
CREATE TABLE plantstatus (
1934
    plantstatus_id int(11) NOT NULL,
1935
    taxonconcept_id int(11) NOT NULL,
1936
    party_id int(11),
1937
    taxonconceptstatus text DEFAULT 'undetermined' NOT NULL,
1938
    reference_id int(11),
1939
    plantpartycomments text,
1940
    startdate timestamp NULL,
1941
    stopdate timestamp NULL,
1942
    accessioncode text
1943
);
1944

  
1945

  
1946
--
1947
-- Name: plantstatus_plantstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1948
--
1949

  
1950

  
1951

  
1952

  
1953
--
1954
-- Name: plantstatus_plantstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1955
--
1956

  
1957

  
1958

  
1959

  
1960
--
1961
-- Name: plantusage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1962
--
1963

  
1964
CREATE TABLE plantusage (
1965
    plantusage_id int(11) NOT NULL,
1966
    taxonconcept_id int(11) NOT NULL,
1967
    taxonstatus text,
1968
    taxon text,
1969
    classsystem text,
1970
    acceptedsynonym text,
1971
    party_id int(11),
1972
    plantstatus_id int(11),
1973
    usagestart timestamp NULL,
1974
    usagestop timestamp NULL
1975
);
1976

  
1977

  
1978
--
1979
-- Name: plantusage_plantusage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1980
--
1981

  
1982

  
1983

  
1984

  
1985
--
1986
-- Name: plantusage_plantusage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1987
--
1988

  
1989

  
1990

  
1991

  
1992
--
1993 1877
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1994 1878
--
1995 1879

  
......
2496 2380

  
2497 2381

  
2498 2382
--
2383
-- Name: taxoncorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2384
--
2385

  
2386
CREATE TABLE taxoncorrelation (
2387
    taxoncorrelation_id int(11) NOT NULL,
2388
    taxonstatus_id int(11) NOT NULL,
2389
    taxonconcept_id int(11) NOT NULL,
2390
    plantconvergence text NOT NULL,
2391
    correlationstart timestamp NOT NULL,
2392
    correlationstop timestamp NULL
2393
);
2394

  
2395

  
2396
--
2397
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2398
--
2399

  
2400

  
2401

  
2402

  
2403
--
2404
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2405
--
2406

  
2407

  
2408

  
2409

  
2410
--
2499 2411
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2500 2412
--
2501 2413

  
......
2510 2422

  
2511 2423

  
2512 2424
--
2425
-- Name: taxonlineage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2426
--
2427

  
2428
CREATE TABLE taxonlineage (
2429
    taxonlineage_id int(11) NOT NULL,
2430
    childtaxonstatus_id int(11) NOT NULL,
2431
    parenttaxonstatus_id int(11) NOT NULL
2432
);
2433

  
2434

  
2435
--
2436
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2437
--
2438

  
2439

  
2440

  
2441

  
2442
--
2443
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2444
--
2445

  
2446

  
2447

  
2448

  
2449
--
2513 2450
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2514 2451
--
2515 2452

  
......
2524 2461

  
2525 2462

  
2526 2463
--
2464
-- Name: taxonstatus; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2465
--
2466

  
2467
CREATE TABLE taxonstatus (
2468
    taxonstatus_id int(11) NOT NULL,
2469
    taxonconcept_id int(11) NOT NULL,
2470
    party_id int(11),
2471
    taxonconceptstatus text DEFAULT 'undetermined' NOT NULL,
2472
    reference_id int(11),
2473
    plantpartycomments text,
2474
    startdate timestamp NULL,
2475
    stopdate timestamp NULL,
2476
    accessioncode text
2477
);
2478

  
2479

  
2480
--
2481
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2482
--
2483

  
2484

  
2485

  
2486

  
2487
--
2488
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2489
--
2490

  
2491

  
2492

  
2493

  
2494
--
2495
-- Name: taxonusage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2496
--
2497

  
2498
CREATE TABLE taxonusage (
2499
    taxonusage_id int(11) NOT NULL,
2500
    taxonconcept_id int(11) NOT NULL,
2501
    taxonstatus text,
2502
    taxon text,
2503
    classsystem text,
2504
    acceptedsynonym text,
2505
    party_id int(11),
2506
    taxonstatus_id int(11),
2507
    usagestart timestamp NULL,
2508
    usagestop timestamp NULL
2509
);
2510

  
2511

  
2512
--
2513
-- Name: taxonusage_taxonusage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2514
--
2515

  
2516

  
2517

  
2518

  
2519
--
2520
-- Name: taxonusage_taxonusage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2521
--
2522

  
2523

  
2524

  
2525

  
2526
--
2527 2527
-- Name: telephone; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2528 2528
--
2529 2529

  
......
2854 2854

  
2855 2855

  
2856 2856
--
2857
-- Name: plantcorrelation_id; Type: DEFAULT; Schema: public; Owner: -
2857
-- Name: plantobservation_id; Type: DEFAULT; Schema: public; Owner: -
2858 2858
--
2859 2859

  
2860 2860

  
2861 2861

  
2862 2862

  
2863 2863
--
2864
-- Name: plantlineage_id; Type: DEFAULT; Schema: public; Owner: -
2864
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
2865 2865
--
2866 2866

  
2867 2867

  
2868 2868

  
2869 2869

  
2870 2870
--
2871
-- Name: plantobservation_id; Type: DEFAULT; Schema: public; Owner: -
2871
-- Name: projectcontributor_id; Type: DEFAULT; Schema: public; Owner: -
2872 2872
--
2873 2873

  
2874 2874

  
2875 2875

  
2876 2876

  
2877 2877
--
2878
-- Name: plantstatus_id; Type: DEFAULT; Schema: public; Owner: -
2878
-- Name: reference_id; Type: DEFAULT; Schema: public; Owner: -
2879 2879
--
2880 2880

  
2881 2881

  
2882 2882

  
2883 2883

  
2884 2884
--
2885
-- Name: plantusage_id; Type: DEFAULT; Schema: public; Owner: -
2885
-- Name: referencealtident_id; Type: DEFAULT; Schema: public; Owner: -
2886 2886
--
2887 2887

  
2888 2888

  
2889 2889

  
2890 2890

  
2891 2891
--
2892
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
2892
-- Name: referencecontributor_id; Type: DEFAULT; Schema: public; Owner: -
2893 2893
--
2894 2894

  
2895 2895

  
2896 2896

  
2897 2897

  
2898 2898
--
2899
-- Name: projectcontributor_id; Type: DEFAULT; Schema: public; Owner: -
2899
-- Name: referencejournal_id; Type: DEFAULT; Schema: public; Owner: -
2900 2900
--
2901 2901

  
2902 2902

  
2903 2903

  
2904 2904

  
2905 2905
--
2906
-- Name: reference_id; Type: DEFAULT; Schema: public; Owner: -
2906
-- Name: referenceparty_id; Type: DEFAULT; Schema: public; Owner: -
2907 2907
--
2908 2908

  
2909 2909

  
2910 2910

  
2911 2911

  
2912 2912
--
2913
-- Name: referencealtident_id; Type: DEFAULT; Schema: public; Owner: -
2913
-- Name: revision_id; Type: DEFAULT; Schema: public; Owner: -
2914 2914
--
2915 2915

  
2916 2916

  
2917 2917

  
2918 2918

  
2919 2919
--
2920
-- Name: referencecontributor_id; Type: DEFAULT; Schema: public; Owner: -
2920
-- Name: soilobs_id; Type: DEFAULT; Schema: public; Owner: -
2921 2921
--
2922 2922

  
2923 2923

  
2924 2924

  
2925 2925

  
2926 2926
--
2927
-- Name: referencejournal_id; Type: DEFAULT; Schema: public; Owner: -
2927
-- Name: soiltaxon_id; Type: DEFAULT; Schema: public; Owner: -
2928 2928
--
2929 2929

  
2930 2930

  
2931 2931

  
2932 2932

  
2933 2933
--
2934
-- Name: referenceparty_id; Type: DEFAULT; Schema: public; Owner: -
2934
-- Name: specimen_id; Type: DEFAULT; Schema: public; Owner: -
2935 2935
--
2936 2936

  
2937 2937

  
2938 2938

  
2939 2939

  
2940 2940
--
2941
-- Name: revision_id; Type: DEFAULT; Schema: public; Owner: -
2941
-- Name: specimenreplicate_id; Type: DEFAULT; Schema: public; Owner: -
2942 2942
--
2943 2943

  
2944 2944

  
2945 2945

  
2946 2946

  
2947 2947
--
2948
-- Name: soilobs_id; Type: DEFAULT; Schema: public; Owner: -
2948
-- Name: stemobservation_id; Type: DEFAULT; Schema: public; Owner: -
2949 2949
--
2950 2950

  
2951 2951

  
2952 2952

  
2953 2953

  
2954 2954
--
2955
-- Name: soiltaxon_id; Type: DEFAULT; Schema: public; Owner: -
2955
-- Name: stratum_id; Type: DEFAULT; Schema: public; Owner: -
2956 2956
--
2957 2957

  
2958 2958

  
2959 2959

  
2960 2960

  
2961 2961
--
2962
-- Name: specimen_id; Type: DEFAULT; Schema: public; Owner: -
2962
-- Name: taxonalt_id; Type: DEFAULT; Schema: public; Owner: -
2963 2963
--
2964 2964

  
2965 2965

  
2966 2966

  
2967 2967

  
2968 2968
--
2969
-- Name: specimenreplicate_id; Type: DEFAULT; Schema: public; Owner: -
2969
-- Name: taxonconcept_id; Type: DEFAULT; Schema: public; Owner: -
2970 2970
--
2971 2971

  
2972 2972

  
2973 2973

  
2974 2974

  
2975 2975
--
2976
-- Name: stemobservation_id; Type: DEFAULT; Schema: public; Owner: -
2976
-- Name: taxoncorrelation_id; Type: DEFAULT; Schema: public; Owner: -
2977 2977
--
2978 2978

  
2979 2979

  
2980 2980

  
2981 2981

  
2982 2982
--
2983
-- Name: stratum_id; Type: DEFAULT; Schema: public; Owner: -
2983
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
2984 2984
--
2985 2985

  
2986 2986

  
2987 2987

  
2988 2988

  
2989 2989
--
2990
-- Name: taxonalt_id; Type: DEFAULT; Schema: public; Owner: -
2990
-- Name: taxonlineage_id; Type: DEFAULT; Schema: public; Owner: -
2991 2991
--
2992 2992

  
2993 2993

  
2994 2994

  
2995 2995

  
2996 2996
--
2997
-- Name: taxonconcept_id; Type: DEFAULT; Schema: public; Owner: -
2997
-- Name: taxonoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
2998 2998
--
2999 2999

  
3000 3000

  
3001 3001

  
3002 3002

  
3003 3003
--
3004
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
3004
-- Name: taxonstatus_id; Type: DEFAULT; Schema: public; Owner: -
3005 3005
--
3006 3006

  
3007 3007

  
3008 3008

  
3009 3009

  
3010 3010
--
3011
-- Name: taxonoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
3011
-- Name: taxonusage_id; Type: DEFAULT; Schema: public; Owner: -
3012 3012
--
3013 3013

  
3014 3014

  
......
3355 3355

  
3356 3356

  
3357 3357
--
3358
-- Name: plantcorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3359
--
3360

  
3361
ALTER TABLE plantcorrelation
3362
    ADD CONSTRAINT plantcorrelation_pkey PRIMARY KEY (plantcorrelation_id);
3363

  
3364

  
3365
--
3366
-- Name: plantlineage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3367
--
3368

  
3369
ALTER TABLE plantlineage
3370
    ADD CONSTRAINT plantlineage_pkey PRIMARY KEY (plantlineage_id);
3371

  
3372

  
3373
--
3374 3358
-- Name: plantobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3375 3359
--
3376 3360

  
......
3379 3363

  
3380 3364

  
3381 3365
--
3382
-- Name: plantstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3383
--
3384

  
3385
ALTER TABLE plantstatus
3386
    ADD CONSTRAINT plantstatus_pkey PRIMARY KEY (plantstatus_id);
3387

  
3388

  
3389
--
3390
-- Name: plantstatus_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3391
--
3392

  
3393
ALTER TABLE plantstatus
3394
    ADD CONSTRAINT plantstatus_unique UNIQUE (taxonconcept_id, party_id);
3395

  
3396

  
3397
--
3398
-- Name: plantusage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3399
--
3400

  
3401
ALTER TABLE plantusage
3402
    ADD CONSTRAINT plantusage_pkey PRIMARY KEY (plantusage_id);
3403

  
3404

  
3405
--
3406 3366
-- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3407 3367
--
3408 3368

  
......
3555 3515

  
3556 3516

  
3557 3517
--
3518
-- Name: taxoncorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3519
--
3520

  
3521
ALTER TABLE taxoncorrelation
3522
    ADD CONSTRAINT taxoncorrelation_pkey PRIMARY KEY (taxoncorrelation_id);
3523

  
3524

  
3525
--
3558 3526
-- Name: taxondetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3559 3527
--
3560 3528

  
......
3563 3531

  
3564 3532

  
3565 3533
--
3534
-- Name: taxonlineage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3535
--
3536

  
3537
ALTER TABLE taxonlineage
3538
    ADD CONSTRAINT taxonlineage_pkey PRIMARY KEY (taxonlineage_id);
3539

  
3540

  
3541
--
3566 3542
-- Name: taxonoccurrence_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3567 3543
--
3568 3544

  
......
3571 3547

  
3572 3548

  
3573 3549
--
3550
-- Name: taxonstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3551
--
3552

  
3553
ALTER TABLE taxonstatus
3554
    ADD CONSTRAINT taxonstatus_pkey PRIMARY KEY (taxonstatus_id);
3555

  
3556

  
3557
--
3558
-- Name: taxonstatus_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3559
--
3560

  
3561
ALTER TABLE taxonstatus
3562
    ADD CONSTRAINT taxonstatus_unique UNIQUE (taxonconcept_id, party_id);
3563

  
3564

  
3565
--
3566
-- Name: taxonusage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3567
--
3568

  
3569
ALTER TABLE taxonusage
3570
    ADD CONSTRAINT taxonusage_pkey PRIMARY KEY (taxonusage_id);
3571

  
3572

  
3573
--
3574 3574
-- Name: telephone_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3575 3575
--
3576 3576

  
......
3864 3864

  
3865 3865

  
3866 3866
--
3867
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3868
--
3869

  
3870
CREATE UNIQUE INDEX plantstatus_accessioncode_index ON plantstatus  (accessioncode);
3871

  
3872

  
3873
--
3874 3867
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3875 3868
--
3876 3869

  
......
4039 4032

  
4040 4033

  
4041 4034
--
4035
-- Name: taxonstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4036
--
4037

  
4038
CREATE UNIQUE INDEX taxonstatus_accessioncode_index ON taxonstatus  (accessioncode);
4039

  
4040

  
4041
--
4042 4042
-- Name: userdefined_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4043 4043
--
4044 4044

  
......
4649 4649

  
4650 4650

  
4651 4651
--
4652
-- Name: plantcorrelation_plantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4653
--
4654

  
4655
ALTER TABLE plantcorrelation
4656
    ADD CONSTRAINT plantcorrelation_plantstatus_id_fkey FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4657

  
4658

  
4659
--
4660
-- Name: plantcorrelation_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4661
--
4662

  
4663

  
4664

  
4665

  
4666
--
4667
-- Name: plantlineage_childplantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4668
--
4669

  
4670
ALTER TABLE plantlineage
4671
    ADD CONSTRAINT plantlineage_childplantstatus_id_fkey FOREIGN KEY (childplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4672

  
4673

  
4674
--
4675
-- Name: plantlineage_parentplantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4676
--
4677

  
4678
ALTER TABLE plantlineage
4679
    ADD CONSTRAINT plantlineage_parentplantstatus_id_fkey FOREIGN KEY (parentplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4680

  
4681

  
4682
--
4683 4652
-- Name: plantobservation_aggregateoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4684 4653
--
4685 4654

  
......
4703 4672

  
4704 4673

  
4705 4674
--
4706
-- Name: plantstatus_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4707
--
4708

  
4709

  
4710

  
4711

  
4712
--
4713
-- Name: plantstatus_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4714
--
4715

  
4716

  
4717

  
4718

  
4719
--
4720
-- Name: plantstatus_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4721
--
4722

  
4723
ALTER TABLE plantstatus
4724
    ADD CONSTRAINT plantstatus_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
4725

  
4726

  
4727
--
4728
-- Name: plantusage_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4729
--
4730

  
4731

  
4732

  
4733

  
4734
--
4735
-- Name: plantusage_plantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4736
--
4737

  
4738
ALTER TABLE plantusage
4739
    ADD CONSTRAINT plantusage_plantstatus_id_fkey FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4740

  
4741

  
4742
--
4743
-- Name: plantusage_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4744
--
4745

  
4746

  
4747

  
4748

  
4749
--
4750 4675
-- Name: project_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4751 4676
--
4752 4677

  
......
4948 4873

  
4949 4874

  
4950 4875
--
4876
-- Name: taxoncorrelation_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4877
--
4878

  
4879

  
4880

  
4881

  
4882
--
4883
-- Name: taxoncorrelation_taxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4884
--
4885

  
4886
ALTER TABLE taxoncorrelation
4887
    ADD CONSTRAINT taxoncorrelation_taxonstatus_id_fkey FOREIGN KEY (taxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4888

  
4889

  
4890
--
4951 4891
-- Name: taxondetermination_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4952 4892
--
4953 4893

  
......
4978 4918

  
4979 4919

  
4980 4920
--
4921
-- Name: taxonlineage_childtaxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4922
--
4923

  
4924
ALTER TABLE taxonlineage
4925
    ADD CONSTRAINT taxonlineage_childtaxonstatus_id_fkey FOREIGN KEY (childtaxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4926

  
4927

  
4928
--
4929
-- Name: taxonlineage_parenttaxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4930
--
4931

  
4932
ALTER TABLE taxonlineage
4933
    ADD CONSTRAINT taxonlineage_parenttaxonstatus_id_fkey FOREIGN KEY (parenttaxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4934

  
4935

  
4936
--
4981 4937
-- Name: taxonoccurrence_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4982 4938
--
4983 4939

  
......
4993 4949

  
4994 4950

  
4995 4951
--
4952
-- Name: taxonstatus_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4953
--
4954

  
4955

  
4956

  
4957

  
4958
--
4959
-- Name: taxonstatus_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4960
--
4961

  
4962

  
4963

  
4964

  
4965
--
4966
-- Name: taxonstatus_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4967
--
4968

  
4969
ALTER TABLE taxonstatus
4970
    ADD CONSTRAINT taxonstatus_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
4971

  
4972

  
4973
--
4974
-- Name: taxonusage_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4975
--
4976

  
4977

  
4978

  
4979

  
4980
--
4981
-- Name: taxonusage_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4982
--
4983

  
4984

  
4985

  
4986

  
4987
--
4988
-- Name: taxonusage_taxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4989
--
4990

  
4991
ALTER TABLE taxonusage
4992
    ADD CONSTRAINT taxonusage_taxonstatus_id_fkey FOREIGN KEY (taxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
4993

  
4994

  
4995
--
4996 4996
-- Name: telephone_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4997 4997
--
4998 4998

  

Also available in: Unified diff