Project

General

Profile

« Previous | Next » 

Revision 6145

schemas/vegbien.sql: Renamed referencealtident to referencename to allow any verbatim reference name to go here, with reference containing the corresponding accepted reference name

View differences:

schemas/vegbien.my.sql
2543 2543

  
2544 2544

  
2545 2545
--
2546
-- Name: referencealtident; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2546
-- Name: referencecontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2547 2547
--
2548 2548

  
2549
CREATE TABLE referencealtident (
2550
    referencealtident_id int(11) NOT NULL,
2549
CREATE TABLE referencecontributor (
2550
    referencecontributor_id int(11) NOT NULL,
2551 2551
    reference_id int(11) NOT NULL,
2552
    system text,
2553
    identifier text NOT NULL
2552
    referenceparty_id int(11) NOT NULL,
2553
    roletype text,
2554
    `position` int(11)
2554 2555
);
2555 2556

  
2556 2557

  
2557 2558
--
2558
-- Name: referencealtident_referencealtident_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2559
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2559 2560
--
2560 2561

  
2561 2562

  
2562 2563

  
2563 2564

  
2564 2565
--
2565
-- Name: referencealtident_referencealtident_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2566
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2566 2567
--
2567 2568

  
2568 2569

  
2569 2570

  
2570 2571

  
2571 2572
--
2572
-- Name: referencealtident_referencealtident_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2573
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2573 2574
--
2574 2575

  
2575 2576

  
2576 2577

  
2577 2578
--
2578
-- Name: referencecontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2579
-- Name: referencejournal; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2579 2580
--
2580 2581

  
2581
CREATE TABLE referencecontributor (
2582
    referencecontributor_id int(11) NOT NULL,
2583
    reference_id int(11) NOT NULL,
2584
    referenceparty_id int(11) NOT NULL,
2585
    roletype text,
2586
    `position` int(11)
2582
CREATE TABLE referencejournal (
2583
    referencejournal_id int(11) NOT NULL,
2584
    journal text NOT NULL,
2585
    issn text,
2586
    abbreviation text,
2587
    accessioncode text
2587 2588
);
2588 2589

  
2589 2590

  
2590 2591
--
2591
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2592
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2592 2593
--
2593 2594

  
2594 2595

  
2595 2596

  
2596 2597

  
2597 2598
--
2598
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2599
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2599 2600
--
2600 2601

  
2601 2602

  
2602 2603

  
2603 2604

  
2604 2605
--
2605
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2606
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2606 2607
--
2607 2608

  
2608 2609

  
2609 2610

  
2610 2611
--
2611
-- Name: referencejournal; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2612
-- Name: referencename; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2612 2613
--
2613 2614

  
2614
CREATE TABLE referencejournal (
2615
    referencejournal_id int(11) NOT NULL,
2616
    journal text NOT NULL,
2617
    issn text,
2618
    abbreviation text,
2619
    accessioncode text
2615
CREATE TABLE referencename (
2616
    referencename_id int(11) NOT NULL,
2617
    reference_id int(11) NOT NULL,
2618
    system text,
2619
    identifier text NOT NULL
2620 2620
);
2621 2621

  
2622 2622

  
2623 2623
--
2624
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2624
-- Name: referencename_referencename_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2625 2625
--
2626 2626

  
2627 2627

  
2628 2628

  
2629 2629

  
2630 2630
--
2631
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2631
-- Name: referencename_referencename_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2632 2632
--
2633 2633

  
2634 2634

  
2635 2635

  
2636 2636

  
2637 2637
--
2638
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2638
-- Name: referencename_referencename_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
2639 2639
--
2640 2640

  
2641 2641

  
......
3596 3596

  
3597 3597

  
3598 3598
--
3599
-- Name: referencealtident_id; Type: DEFAULT; Schema: public; Owner: -
3599
-- Name: referencecontributor_id; Type: DEFAULT; Schema: public; Owner: -
3600 3600
--
3601 3601

  
3602 3602

  
3603 3603

  
3604 3604

  
3605 3605
--
3606
-- Name: referencecontributor_id; Type: DEFAULT; Schema: public; Owner: -
3606
-- Name: referencejournal_id; Type: DEFAULT; Schema: public; Owner: -
3607 3607
--
3608 3608

  
3609 3609

  
3610 3610

  
3611 3611

  
3612 3612
--
3613
-- Name: referencejournal_id; Type: DEFAULT; Schema: public; Owner: -
3613
-- Name: referencename_id; Type: DEFAULT; Schema: public; Owner: -
3614 3614
--
3615 3615

  
3616 3616

  
......
4014 4014

  
4015 4015

  
4016 4016
--
4017
-- Data for Name: referencealtident; Type: TABLE DATA; Schema: public; Owner: -
4017
-- Data for Name: referencecontributor; Type: TABLE DATA; Schema: public; Owner: -
4018 4018
--
4019 4019

  
4020 4020

  
4021 4021

  
4022 4022
--
4023
-- Data for Name: referencecontributor; Type: TABLE DATA; Schema: public; Owner: -
4023
-- Data for Name: referencejournal; Type: TABLE DATA; Schema: public; Owner: -
4024 4024
--
4025 4025

  
4026 4026

  
4027 4027

  
4028 4028
--
4029
-- Data for Name: referencejournal; Type: TABLE DATA; Schema: public; Owner: -
4029
-- Data for Name: referencename; Type: TABLE DATA; Schema: public; Owner: -
4030 4030
--
4031 4031

  
4032 4032

  
......
4532 4532

  
4533 4533

  
4534 4534
--
4535
-- Name: referencealtident_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4536
--
4537

  
4538
ALTER TABLE referencealtident
4539
    ADD CONSTRAINT referencealtident_pkey PRIMARY KEY (referencealtident_id);
4540

  
4541

  
4542
--
4543 4535
-- Name: referencecontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4544 4536
--
4545 4537

  
......
4556 4548

  
4557 4549

  
4558 4550
--
4551
-- Name: referencename_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4552
--
4553

  
4554
ALTER TABLE referencename
4555
    ADD CONSTRAINT referencename_pkey PRIMARY KEY (referencename_id);
4556

  
4557

  
4558
--
4559 4559
-- Name: revision_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4560 4560
--
4561 4561

  
......
5937 5937

  
5938 5938

  
5939 5939
--
5940
-- Name: referencealtident_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5941
--
5942

  
5943
ALTER TABLE referencealtident
5944
    ADD CONSTRAINT referencealtident_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
5945

  
5946

  
5947
--
5948 5940
-- Name: referencecontributor_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5949 5941
--
5950 5942

  
......
5961 5953

  
5962 5954

  
5963 5955
--
5956
-- Name: referencename_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5957
--
5958

  
5959
ALTER TABLE referencename
5960
    ADD CONSTRAINT referencename_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
5961

  
5962

  
5963
--
5964 5964
-- Name: revision_previousrevision_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5965 5965
--
5966 5966

  
schemas/vegbien.sql
3390 3390

  
3391 3391

  
3392 3392
--
3393
-- Name: referencealtident; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3393
-- Name: referencecontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3394 3394
--
3395 3395

  
3396
CREATE TABLE referencealtident (
3397
    referencealtident_id integer NOT NULL,
3396
CREATE TABLE referencecontributor (
3397
    referencecontributor_id integer NOT NULL,
3398 3398
    reference_id integer NOT NULL,
3399
    system text,
3400
    identifier text NOT NULL
3399
    referenceparty_id integer NOT NULL,
3400
    roletype text,
3401
    "position" integer
3401 3402
);
3402 3403

  
3403 3404

  
3404 3405
--
3405
-- Name: referencealtident_referencealtident_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3406
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3406 3407
--
3407 3408

  
3408
CREATE SEQUENCE referencealtident_referencealtident_id_seq
3409
CREATE SEQUENCE referencecontributor_referencecontributor_id_seq
3409 3410
    START WITH 1
3410 3411
    INCREMENT BY 1
3411 3412
    NO MINVALUE
......
3414 3415

  
3415 3416

  
3416 3417
--
3417
-- Name: referencealtident_referencealtident_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3418
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3418 3419
--
3419 3420

  
3420
ALTER SEQUENCE referencealtident_referencealtident_id_seq OWNED BY referencealtident.referencealtident_id;
3421
ALTER SEQUENCE referencecontributor_referencecontributor_id_seq OWNED BY referencecontributor.referencecontributor_id;
3421 3422

  
3422 3423

  
3423 3424
--
3424
-- Name: referencealtident_referencealtident_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3425
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3425 3426
--
3426 3427

  
3427 3428

  
3428 3429

  
3429 3430
--
3430
-- Name: referencecontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3431
-- Name: referencejournal; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3431 3432
--
3432 3433

  
3433
CREATE TABLE referencecontributor (
3434
    referencecontributor_id integer NOT NULL,
3435
    reference_id integer NOT NULL,
3436
    referenceparty_id integer NOT NULL,
3437
    roletype text,
3438
    "position" integer
3434
CREATE TABLE referencejournal (
3435
    referencejournal_id integer NOT NULL,
3436
    journal text NOT NULL,
3437
    issn text,
3438
    abbreviation text,
3439
    accessioncode text
3439 3440
);
3440 3441

  
3441 3442

  
3442 3443
--
3443
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3444
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3444 3445
--
3445 3446

  
3446
CREATE SEQUENCE referencecontributor_referencecontributor_id_seq
3447
CREATE SEQUENCE referencejournal_referencejournal_id_seq
3447 3448
    START WITH 1
3448 3449
    INCREMENT BY 1
3449 3450
    NO MINVALUE
......
3452 3453

  
3453 3454

  
3454 3455
--
3455
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3456
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3456 3457
--
3457 3458

  
3458
ALTER SEQUENCE referencecontributor_referencecontributor_id_seq OWNED BY referencecontributor.referencecontributor_id;
3459
ALTER SEQUENCE referencejournal_referencejournal_id_seq OWNED BY referencejournal.referencejournal_id;
3459 3460

  
3460 3461

  
3461 3462
--
3462
-- Name: referencecontributor_referencecontributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3463
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3463 3464
--
3464 3465

  
3465 3466

  
3466 3467

  
3467 3468
--
3468
-- Name: referencejournal; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3469
-- Name: referencename; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3469 3470
--
3470 3471

  
3471
CREATE TABLE referencejournal (
3472
    referencejournal_id integer NOT NULL,
3473
    journal text NOT NULL,
3474
    issn text,
3475
    abbreviation text,
3476
    accessioncode text
3472
CREATE TABLE referencename (
3473
    referencename_id integer NOT NULL,
3474
    reference_id integer NOT NULL,
3475
    system text,
3476
    identifier text NOT NULL
3477 3477
);
3478 3478

  
3479 3479

  
3480 3480
--
3481
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3481
-- Name: referencename_referencename_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3482 3482
--
3483 3483

  
3484
CREATE SEQUENCE referencejournal_referencejournal_id_seq
3484
CREATE SEQUENCE referencename_referencename_id_seq
3485 3485
    START WITH 1
3486 3486
    INCREMENT BY 1
3487 3487
    NO MINVALUE
......
3490 3490

  
3491 3491

  
3492 3492
--
3493
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3493
-- Name: referencename_referencename_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3494 3494
--
3495 3495

  
3496
ALTER SEQUENCE referencejournal_referencejournal_id_seq OWNED BY referencejournal.referencejournal_id;
3496
ALTER SEQUENCE referencename_referencename_id_seq OWNED BY referencename.referencename_id;
3497 3497

  
3498 3498

  
3499 3499
--
3500
-- Name: referencejournal_referencejournal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3500
-- Name: referencename_referencename_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
3501 3501
--
3502 3502

  
3503 3503

  
......
4563 4563

  
4564 4564

  
4565 4565
--
4566
-- Name: referencealtident_id; Type: DEFAULT; Schema: public; Owner: -
4566
-- Name: referencecontributor_id; Type: DEFAULT; Schema: public; Owner: -
4567 4567
--
4568 4568

  
4569
ALTER TABLE referencealtident ALTER COLUMN referencealtident_id SET DEFAULT nextval('referencealtident_referencealtident_id_seq'::regclass);
4569
ALTER TABLE referencecontributor ALTER COLUMN referencecontributor_id SET DEFAULT nextval('referencecontributor_referencecontributor_id_seq'::regclass);
4570 4570

  
4571 4571

  
4572 4572
--
4573
-- Name: referencecontributor_id; Type: DEFAULT; Schema: public; Owner: -
4573
-- Name: referencejournal_id; Type: DEFAULT; Schema: public; Owner: -
4574 4574
--
4575 4575

  
4576
ALTER TABLE referencecontributor ALTER COLUMN referencecontributor_id SET DEFAULT nextval('referencecontributor_referencecontributor_id_seq'::regclass);
4576
ALTER TABLE referencejournal ALTER COLUMN referencejournal_id SET DEFAULT nextval('referencejournal_referencejournal_id_seq'::regclass);
4577 4577

  
4578 4578

  
4579 4579
--
4580
-- Name: referencejournal_id; Type: DEFAULT; Schema: public; Owner: -
4580
-- Name: referencename_id; Type: DEFAULT; Schema: public; Owner: -
4581 4581
--
4582 4582

  
4583
ALTER TABLE referencejournal ALTER COLUMN referencejournal_id SET DEFAULT nextval('referencejournal_referencejournal_id_seq'::regclass);
4583
ALTER TABLE referencename ALTER COLUMN referencename_id SET DEFAULT nextval('referencename_referencename_id_seq'::regclass);
4584 4584

  
4585 4585

  
4586 4586
--
......
4981 4981

  
4982 4982

  
4983 4983
--
4984
-- Data for Name: referencealtident; Type: TABLE DATA; Schema: public; Owner: -
4984
-- Data for Name: referencecontributor; Type: TABLE DATA; Schema: public; Owner: -
4985 4985
--
4986 4986

  
4987 4987

  
4988 4988

  
4989 4989
--
4990
-- Data for Name: referencecontributor; Type: TABLE DATA; Schema: public; Owner: -
4990
-- Data for Name: referencejournal; Type: TABLE DATA; Schema: public; Owner: -
4991 4991
--
4992 4992

  
4993 4993

  
4994 4994

  
4995 4995
--
4996
-- Data for Name: referencejournal; Type: TABLE DATA; Schema: public; Owner: -
4996
-- Data for Name: referencename; Type: TABLE DATA; Schema: public; Owner: -
4997 4997
--
4998 4998

  
4999 4999

  
......
5499 5499

  
5500 5500

  
5501 5501
--
5502
-- Name: referencealtident_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
5503
--
5504

  
5505
ALTER TABLE ONLY referencealtident
5506
    ADD CONSTRAINT referencealtident_pkey PRIMARY KEY (referencealtident_id);
5507

  
5508

  
5509
--
5510 5502
-- Name: referencecontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
5511 5503
--
5512 5504

  
......
5523 5515

  
5524 5516

  
5525 5517
--
5518
-- Name: referencename_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
5519
--
5520

  
5521
ALTER TABLE ONLY referencename
5522
    ADD CONSTRAINT referencename_pkey PRIMARY KEY (referencename_id);
5523

  
5524

  
5525
--
5526 5526
-- Name: revision_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
5527 5527
--
5528 5528

  
......
6933 6933

  
6934 6934

  
6935 6935
--
6936
-- Name: referencealtident_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6937
--
6938

  
6939
ALTER TABLE ONLY referencealtident
6940
    ADD CONSTRAINT referencealtident_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
6941

  
6942

  
6943
--
6944 6936
-- Name: referencecontributor_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6945 6937
--
6946 6938

  
......
6957 6949

  
6958 6950

  
6959 6951
--
6952
-- Name: referencename_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6953
--
6954

  
6955
ALTER TABLE ONLY referencename
6956
    ADD CONSTRAINT referencename_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
6957

  
6958

  
6959
--
6960 6960
-- Name: revision_previousrevision_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
6961 6961
--
6962 6962

  

Also available in: Unified diff