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.sql
2370 2370

  
2371 2371

  
2372 2372
--
2373
-- Name: plantcorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2374
--
2375

  
2376
CREATE TABLE plantcorrelation (
2377
    plantcorrelation_id integer NOT NULL,
2378
    plantstatus_id integer NOT NULL,
2379
    taxonconcept_id integer NOT NULL,
2380
    plantconvergence text NOT NULL,
2381
    correlationstart timestamp with time zone NOT NULL,
2382
    correlationstop timestamp with time zone
2383
);
2384

  
2385

  
2386
--
2387
-- Name: plantcorrelation_plantcorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2388
--
2389

  
2390
CREATE SEQUENCE plantcorrelation_plantcorrelation_id_seq
2391
    START WITH 1
2392
    INCREMENT BY 1
2393
    NO MINVALUE
2394
    NO MAXVALUE
2395
    CACHE 1;
2396

  
2397

  
2398
--
2399
-- Name: plantcorrelation_plantcorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2400
--
2401

  
2402
ALTER SEQUENCE plantcorrelation_plantcorrelation_id_seq OWNED BY plantcorrelation.plantcorrelation_id;
2403

  
2404

  
2405
--
2406
-- Name: plantlineage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2407
--
2408

  
2409
CREATE TABLE plantlineage (
2410
    plantlineage_id integer NOT NULL,
2411
    childplantstatus_id integer NOT NULL,
2412
    parentplantstatus_id integer NOT NULL
2413
);
2414

  
2415

  
2416
--
2417
-- Name: plantlineage_plantlineage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2418
--
2419

  
2420
CREATE SEQUENCE plantlineage_plantlineage_id_seq
2421
    START WITH 1
2422
    INCREMENT BY 1
2423
    NO MINVALUE
2424
    NO MAXVALUE
2425
    CACHE 1;
2426

  
2427

  
2428
--
2429
-- Name: plantlineage_plantlineage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2430
--
2431

  
2432
ALTER SEQUENCE plantlineage_plantlineage_id_seq OWNED BY plantlineage.plantlineage_id;
2433

  
2434

  
2435
--
2436 2373
-- Name: plantobservation_plantobservation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2437 2374
--
2438 2375

  
......
2452 2389

  
2453 2390

  
2454 2391
--
2455
-- Name: plantstatus; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2456
--
2457

  
2458
CREATE TABLE plantstatus (
2459
    plantstatus_id integer NOT NULL,
2460
    taxonconcept_id integer NOT NULL,
2461
    party_id integer,
2462
    taxonconceptstatus text DEFAULT 'undetermined'::text NOT NULL,
2463
    reference_id integer,
2464
    plantpartycomments text,
2465
    startdate timestamp with time zone,
2466
    stopdate timestamp with time zone,
2467
    accessioncode text
2468
);
2469

  
2470

  
2471
--
2472
-- Name: plantstatus_plantstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2473
--
2474

  
2475
CREATE SEQUENCE plantstatus_plantstatus_id_seq
2476
    START WITH 1
2477
    INCREMENT BY 1
2478
    NO MINVALUE
2479
    NO MAXVALUE
2480
    CACHE 1;
2481

  
2482

  
2483
--
2484
-- Name: plantstatus_plantstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2485
--
2486

  
2487
ALTER SEQUENCE plantstatus_plantstatus_id_seq OWNED BY plantstatus.plantstatus_id;
2488

  
2489

  
2490
--
2491
-- Name: plantusage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2492
--
2493

  
2494
CREATE TABLE plantusage (
2495
    plantusage_id integer NOT NULL,
2496
    taxonconcept_id integer NOT NULL,
2497
    taxonstatus text,
2498
    taxon text,
2499
    classsystem text,
2500
    acceptedsynonym text,
2501
    party_id integer,
2502
    plantstatus_id integer,
2503
    usagestart timestamp with time zone,
2504
    usagestop timestamp with time zone
2505
);
2506

  
2507

  
2508
--
2509
-- Name: plantusage_plantusage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2510
--
2511

  
2512
CREATE SEQUENCE plantusage_plantusage_id_seq
2513
    START WITH 1
2514
    INCREMENT BY 1
2515
    NO MINVALUE
2516
    NO MAXVALUE
2517
    CACHE 1;
2518

  
2519

  
2520
--
2521
-- Name: plantusage_plantusage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2522
--
2523

  
2524
ALTER SEQUENCE plantusage_plantusage_id_seq OWNED BY plantusage.plantusage_id;
2525

  
2526

  
2527
--
2528 2392
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2529 2393
--
2530 2394

  
......
3112 2976

  
3113 2977

  
3114 2978
--
2979
-- Name: taxoncorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2980
--
2981

  
2982
CREATE TABLE taxoncorrelation (
2983
    taxoncorrelation_id integer NOT NULL,
2984
    taxonstatus_id integer NOT NULL,
2985
    taxonconcept_id integer NOT NULL,
2986
    plantconvergence text NOT NULL,
2987
    correlationstart timestamp with time zone NOT NULL,
2988
    correlationstop timestamp with time zone
2989
);
2990

  
2991

  
2992
--
2993
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2994
--
2995

  
2996
CREATE SEQUENCE taxoncorrelation_taxoncorrelation_id_seq
2997
    START WITH 1
2998
    INCREMENT BY 1
2999
    NO MINVALUE
3000
    NO MAXVALUE
3001
    CACHE 1;
3002

  
3003

  
3004
--
3005
-- Name: taxoncorrelation_taxoncorrelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3006
--
3007

  
3008
ALTER SEQUENCE taxoncorrelation_taxoncorrelation_id_seq OWNED BY taxoncorrelation.taxoncorrelation_id;
3009

  
3010

  
3011
--
3115 3012
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3116 3013
--
3117 3014

  
......
3131 3028

  
3132 3029

  
3133 3030
--
3031
-- Name: taxonlineage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3032
--
3033

  
3034
CREATE TABLE taxonlineage (
3035
    taxonlineage_id integer NOT NULL,
3036
    childtaxonstatus_id integer NOT NULL,
3037
    parenttaxonstatus_id integer NOT NULL
3038
);
3039

  
3040

  
3041
--
3042
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3043
--
3044

  
3045
CREATE SEQUENCE taxonlineage_taxonlineage_id_seq
3046
    START WITH 1
3047
    INCREMENT BY 1
3048
    NO MINVALUE
3049
    NO MAXVALUE
3050
    CACHE 1;
3051

  
3052

  
3053
--
3054
-- Name: taxonlineage_taxonlineage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3055
--
3056

  
3057
ALTER SEQUENCE taxonlineage_taxonlineage_id_seq OWNED BY taxonlineage.taxonlineage_id;
3058

  
3059

  
3060
--
3134 3061
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3135 3062
--
3136 3063

  
......
3150 3077

  
3151 3078

  
3152 3079
--
3080
-- Name: taxonstatus; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3081
--
3082

  
3083
CREATE TABLE taxonstatus (
3084
    taxonstatus_id integer NOT NULL,
3085
    taxonconcept_id integer NOT NULL,
3086
    party_id integer,
3087
    taxonconceptstatus text DEFAULT 'undetermined'::text NOT NULL,
3088
    reference_id integer,
3089
    plantpartycomments text,
3090
    startdate timestamp with time zone,
3091
    stopdate timestamp with time zone,
3092
    accessioncode text
3093
);
3094

  
3095

  
3096
--
3097
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3098
--
3099

  
3100
CREATE SEQUENCE taxonstatus_taxonstatus_id_seq
3101
    START WITH 1
3102
    INCREMENT BY 1
3103
    NO MINVALUE
3104
    NO MAXVALUE
3105
    CACHE 1;
3106

  
3107

  
3108
--
3109
-- Name: taxonstatus_taxonstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3110
--
3111

  
3112
ALTER SEQUENCE taxonstatus_taxonstatus_id_seq OWNED BY taxonstatus.taxonstatus_id;
3113

  
3114

  
3115
--
3116
-- Name: taxonusage; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3117
--
3118

  
3119
CREATE TABLE taxonusage (
3120
    taxonusage_id integer NOT NULL,
3121
    taxonconcept_id integer NOT NULL,
3122
    taxonstatus text,
3123
    taxon text,
3124
    classsystem text,
3125
    acceptedsynonym text,
3126
    party_id integer,
3127
    taxonstatus_id integer,
3128
    usagestart timestamp with time zone,
3129
    usagestop timestamp with time zone
3130
);
3131

  
3132

  
3133
--
3134
-- Name: taxonusage_taxonusage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3135
--
3136

  
3137
CREATE SEQUENCE taxonusage_taxonusage_id_seq
3138
    START WITH 1
3139
    INCREMENT BY 1
3140
    NO MINVALUE
3141
    NO MAXVALUE
3142
    CACHE 1;
3143

  
3144

  
3145
--
3146
-- Name: taxonusage_taxonusage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3147
--
3148

  
3149
ALTER SEQUENCE taxonusage_taxonusage_id_seq OWNED BY taxonusage.taxonusage_id;
3150

  
3151

  
3152
--
3153 3153
-- Name: telephone; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3154 3154
--
3155 3155

  
......
3500 3500

  
3501 3501

  
3502 3502
--
3503
-- Name: plantcorrelation_id; Type: DEFAULT; Schema: public; Owner: -
3504
--
3505

  
3506
ALTER TABLE plantcorrelation ALTER COLUMN plantcorrelation_id SET DEFAULT nextval('plantcorrelation_plantcorrelation_id_seq'::regclass);
3507

  
3508

  
3509
--
3510
-- Name: plantlineage_id; Type: DEFAULT; Schema: public; Owner: -
3511
--
3512

  
3513
ALTER TABLE plantlineage ALTER COLUMN plantlineage_id SET DEFAULT nextval('plantlineage_plantlineage_id_seq'::regclass);
3514

  
3515

  
3516
--
3517 3503
-- Name: plantobservation_id; Type: DEFAULT; Schema: public; Owner: -
3518 3504
--
3519 3505

  
......
3521 3507

  
3522 3508

  
3523 3509
--
3524
-- Name: plantstatus_id; Type: DEFAULT; Schema: public; Owner: -
3525
--
3526

  
3527
ALTER TABLE plantstatus ALTER COLUMN plantstatus_id SET DEFAULT nextval('plantstatus_plantstatus_id_seq'::regclass);
3528

  
3529

  
3530
--
3531
-- Name: plantusage_id; Type: DEFAULT; Schema: public; Owner: -
3532
--
3533

  
3534
ALTER TABLE plantusage ALTER COLUMN plantusage_id SET DEFAULT nextval('plantusage_plantusage_id_seq'::regclass);
3535

  
3536

  
3537
--
3538 3510
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
3539 3511
--
3540 3512

  
......
3647 3619

  
3648 3620

  
3649 3621
--
3622
-- Name: taxoncorrelation_id; Type: DEFAULT; Schema: public; Owner: -
3623
--
3624

  
3625
ALTER TABLE taxoncorrelation ALTER COLUMN taxoncorrelation_id SET DEFAULT nextval('taxoncorrelation_taxoncorrelation_id_seq'::regclass);
3626

  
3627

  
3628
--
3650 3629
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
3651 3630
--
3652 3631

  
......
3654 3633

  
3655 3634

  
3656 3635
--
3636
-- Name: taxonlineage_id; Type: DEFAULT; Schema: public; Owner: -
3637
--
3638

  
3639
ALTER TABLE taxonlineage ALTER COLUMN taxonlineage_id SET DEFAULT nextval('taxonlineage_taxonlineage_id_seq'::regclass);
3640

  
3641

  
3642
--
3657 3643
-- Name: taxonoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
3658 3644
--
3659 3645

  
......
3661 3647

  
3662 3648

  
3663 3649
--
3650
-- Name: taxonstatus_id; Type: DEFAULT; Schema: public; Owner: -
3651
--
3652

  
3653
ALTER TABLE taxonstatus ALTER COLUMN taxonstatus_id SET DEFAULT nextval('taxonstatus_taxonstatus_id_seq'::regclass);
3654

  
3655

  
3656
--
3657
-- Name: taxonusage_id; Type: DEFAULT; Schema: public; Owner: -
3658
--
3659

  
3660
ALTER TABLE taxonusage ALTER COLUMN taxonusage_id SET DEFAULT nextval('taxonusage_taxonusage_id_seq'::regclass);
3661

  
3662

  
3663
--
3664 3664
-- Name: telephone_id; Type: DEFAULT; Schema: public; Owner: -
3665 3665
--
3666 3666

  
......
4001 4001

  
4002 4002

  
4003 4003
--
4004
-- Name: plantcorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4005
--
4006

  
4007
ALTER TABLE ONLY plantcorrelation
4008
    ADD CONSTRAINT plantcorrelation_pkey PRIMARY KEY (plantcorrelation_id);
4009

  
4010

  
4011
--
4012
-- Name: plantlineage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4013
--
4014

  
4015
ALTER TABLE ONLY plantlineage
4016
    ADD CONSTRAINT plantlineage_pkey PRIMARY KEY (plantlineage_id);
4017

  
4018

  
4019
--
4020 4004
-- Name: plantobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4021 4005
--
4022 4006

  
......
4025 4009

  
4026 4010

  
4027 4011
--
4028
-- Name: plantstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4029
--
4030

  
4031
ALTER TABLE ONLY plantstatus
4032
    ADD CONSTRAINT plantstatus_pkey PRIMARY KEY (plantstatus_id);
4033

  
4034

  
4035
--
4036
-- Name: plantstatus_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4037
--
4038

  
4039
ALTER TABLE ONLY plantstatus
4040
    ADD CONSTRAINT plantstatus_unique UNIQUE (taxonconcept_id, party_id);
4041

  
4042

  
4043
--
4044
-- Name: plantusage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4045
--
4046

  
4047
ALTER TABLE ONLY plantusage
4048
    ADD CONSTRAINT plantusage_pkey PRIMARY KEY (plantusage_id);
4049

  
4050

  
4051
--
4052 4012
-- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4053 4013
--
4054 4014

  
......
4201 4161

  
4202 4162

  
4203 4163
--
4164
-- Name: taxoncorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4165
--
4166

  
4167
ALTER TABLE ONLY taxoncorrelation
4168
    ADD CONSTRAINT taxoncorrelation_pkey PRIMARY KEY (taxoncorrelation_id);
4169

  
4170

  
4171
--
4204 4172
-- Name: taxondetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4205 4173
--
4206 4174

  
......
4209 4177

  
4210 4178

  
4211 4179
--
4180
-- Name: taxonlineage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4181
--
4182

  
4183
ALTER TABLE ONLY taxonlineage
4184
    ADD CONSTRAINT taxonlineage_pkey PRIMARY KEY (taxonlineage_id);
4185

  
4186

  
4187
--
4212 4188
-- Name: taxonoccurrence_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4213 4189
--
4214 4190

  
......
4217 4193

  
4218 4194

  
4219 4195
--
4196
-- Name: taxonstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4197
--
4198

  
4199
ALTER TABLE ONLY taxonstatus
4200
    ADD CONSTRAINT taxonstatus_pkey PRIMARY KEY (taxonstatus_id);
4201

  
4202

  
4203
--
4204
-- Name: taxonstatus_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4205
--
4206

  
4207
ALTER TABLE ONLY taxonstatus
4208
    ADD CONSTRAINT taxonstatus_unique UNIQUE (taxonconcept_id, party_id);
4209

  
4210

  
4211
--
4212
-- Name: taxonusage_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4213
--
4214

  
4215
ALTER TABLE ONLY taxonusage
4216
    ADD CONSTRAINT taxonusage_pkey PRIMARY KEY (taxonusage_id);
4217

  
4218

  
4219
--
4220 4220
-- Name: telephone_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4221 4221
--
4222 4222

  
......
4510 4510

  
4511 4511

  
4512 4512
--
4513
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4514
--
4515

  
4516
CREATE UNIQUE INDEX plantstatus_accessioncode_index ON plantstatus USING btree (accessioncode);
4517

  
4518

  
4519
--
4520 4513
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4521 4514
--
4522 4515

  
......
4685 4678

  
4686 4679

  
4687 4680
--
4681
-- Name: taxonstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4682
--
4683

  
4684
CREATE UNIQUE INDEX taxonstatus_accessioncode_index ON taxonstatus USING btree (accessioncode);
4685

  
4686

  
4687
--
4688 4688
-- Name: userdefined_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4689 4689
--
4690 4690

  
......
5318 5318

  
5319 5319

  
5320 5320
--
5321
-- Name: plantcorrelation_plantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5322
--
5323

  
5324
ALTER TABLE ONLY plantcorrelation
5325
    ADD CONSTRAINT plantcorrelation_plantstatus_id_fkey FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5326

  
5327

  
5328
--
5329
-- Name: plantcorrelation_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5330
--
5331

  
5332
ALTER TABLE ONLY plantcorrelation
5333
    ADD CONSTRAINT plantcorrelation_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5334

  
5335

  
5336
--
5337
-- Name: plantlineage_childplantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5338
--
5339

  
5340
ALTER TABLE ONLY plantlineage
5341
    ADD CONSTRAINT plantlineage_childplantstatus_id_fkey FOREIGN KEY (childplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5342

  
5343

  
5344
--
5345
-- Name: plantlineage_parentplantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5346
--
5347

  
5348
ALTER TABLE ONLY plantlineage
5349
    ADD CONSTRAINT plantlineage_parentplantstatus_id_fkey FOREIGN KEY (parentplantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5350

  
5351

  
5352
--
5353 5321
-- Name: plantobservation_aggregateoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5354 5322
--
5355 5323

  
......
5374 5342

  
5375 5343

  
5376 5344
--
5377
-- Name: plantstatus_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5378
--
5379

  
5380
ALTER TABLE ONLY plantstatus
5381
    ADD CONSTRAINT plantstatus_party_id_fkey FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5382

  
5383

  
5384
--
5385
-- Name: plantstatus_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5386
--
5387

  
5388
ALTER TABLE ONLY plantstatus
5389
    ADD CONSTRAINT plantstatus_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
5390

  
5391

  
5392
--
5393
-- Name: plantstatus_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5394
--
5395

  
5396
ALTER TABLE ONLY plantstatus
5397
    ADD CONSTRAINT plantstatus_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5398

  
5399

  
5400
--
5401
-- Name: plantusage_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5402
--
5403

  
5404
ALTER TABLE ONLY plantusage
5405
    ADD CONSTRAINT plantusage_party_id_fkey FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5406

  
5407

  
5408
--
5409
-- Name: plantusage_plantstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5410
--
5411

  
5412
ALTER TABLE ONLY plantusage
5413
    ADD CONSTRAINT plantusage_plantstatus_id_fkey FOREIGN KEY (plantstatus_id) REFERENCES plantstatus(plantstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5414

  
5415

  
5416
--
5417
-- Name: plantusage_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5418
--
5419

  
5420
ALTER TABLE ONLY plantusage
5421
    ADD CONSTRAINT plantusage_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5422

  
5423

  
5424
--
5425 5345
-- Name: project_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5426 5346
--
5427 5347

  
......
5630 5550

  
5631 5551

  
5632 5552
--
5553
-- Name: taxoncorrelation_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5554
--
5555

  
5556
ALTER TABLE ONLY taxoncorrelation
5557
    ADD CONSTRAINT taxoncorrelation_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5558

  
5559

  
5560
--
5561
-- Name: taxoncorrelation_taxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5562
--
5563

  
5564
ALTER TABLE ONLY taxoncorrelation
5565
    ADD CONSTRAINT taxoncorrelation_taxonstatus_id_fkey FOREIGN KEY (taxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5566

  
5567

  
5568
--
5633 5569
-- Name: taxondetermination_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5634 5570
--
5635 5571

  
......
5662 5598

  
5663 5599

  
5664 5600
--
5601
-- Name: taxonlineage_childtaxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5602
--
5603

  
5604
ALTER TABLE ONLY taxonlineage
5605
    ADD CONSTRAINT taxonlineage_childtaxonstatus_id_fkey FOREIGN KEY (childtaxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5606

  
5607

  
5608
--
5609
-- Name: taxonlineage_parenttaxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5610
--
5611

  
5612
ALTER TABLE ONLY taxonlineage
5613
    ADD CONSTRAINT taxonlineage_parenttaxonstatus_id_fkey FOREIGN KEY (parenttaxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5614

  
5615

  
5616
--
5665 5617
-- Name: taxonoccurrence_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5666 5618
--
5667 5619

  
......
5678 5630

  
5679 5631

  
5680 5632
--
5633
-- Name: taxonstatus_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5634
--
5635

  
5636
ALTER TABLE ONLY taxonstatus
5637
    ADD CONSTRAINT taxonstatus_party_id_fkey FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5638

  
5639

  
5640
--
5641
-- Name: taxonstatus_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5642
--
5643

  
5644
ALTER TABLE ONLY taxonstatus
5645
    ADD CONSTRAINT taxonstatus_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
5646

  
5647

  
5648
--
5649
-- Name: taxonstatus_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5650
--
5651

  
5652
ALTER TABLE ONLY taxonstatus
5653
    ADD CONSTRAINT taxonstatus_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5654

  
5655

  
5656
--
5657
-- Name: taxonusage_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5658
--
5659

  
5660
ALTER TABLE ONLY taxonusage
5661
    ADD CONSTRAINT taxonusage_party_id_fkey FOREIGN KEY (party_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5662

  
5663

  
5664
--
5665
-- Name: taxonusage_taxonconcept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5666
--
5667

  
5668
ALTER TABLE ONLY taxonusage
5669
    ADD CONSTRAINT taxonusage_taxonconcept_id_fkey FOREIGN KEY (taxonconcept_id) REFERENCES taxonconcept(taxonconcept_id) ON UPDATE CASCADE ON DELETE CASCADE;
5670

  
5671

  
5672
--
5673
-- Name: taxonusage_taxonstatus_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5674
--
5675

  
5676
ALTER TABLE ONLY taxonusage
5677
    ADD CONSTRAINT taxonusage_taxonstatus_id_fkey FOREIGN KEY (taxonstatus_id) REFERENCES taxonstatus(taxonstatus_id) ON UPDATE CASCADE ON DELETE CASCADE;
5678

  
5679

  
5680
--
5681 5681
-- Name: telephone_party_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5682 5682
--
5683 5683

  

Also available in: Unified diff