Project

General

Profile

« Previous | Next » 

Revision 596

VegBIEN: Renamed aux_role to role

View differences:

vegbien.sql
120 120

  
121 121

  
122 122
--
123
-- Name: aux_role; Type: TABLE; Schema: public; Owner: -; Tablespace: 
124
--
125

  
126
CREATE TABLE aux_role (
127
    role_id integer NOT NULL,
128
    rolecode character varying(30) NOT NULL,
129
    roledescription character varying(200),
130
    roleproject integer,
131
    roleobservation integer,
132
    roletaxonint integer,
133
    roleclassint integer,
134
    accessioncode character varying(255)
135
);
136

  
137

  
138
--
139
-- Name: aux_role_role_id_seq; Type: SEQUENCE; Schema: public; Owner: -
140
--
141

  
142
CREATE SEQUENCE aux_role_role_id_seq
143
    START WITH 1
144
    INCREMENT BY 1
145
    NO MINVALUE
146
    NO MAXVALUE
147
    CACHE 1;
148

  
149

  
150
--
151
-- Name: aux_role_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
152
--
153

  
154
ALTER SEQUENCE aux_role_role_id_seq OWNED BY aux_role.role_id;
155

  
156

  
157
--
158 123
-- Name: classcontributor; Type: TABLE; Schema: public; Owner: -; Tablespace: 
159 124
--
160 125

  
......
2135 2100
ALTER SEQUENCE revision_revision_id_seq OWNED BY revision.revision_id;
2136 2101

  
2137 2102

  
2103
--
2104
-- Name: role; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2105
--
2106

  
2107
CREATE TABLE role (
2108
    role_id integer NOT NULL,
2109
    rolecode character varying(30) NOT NULL,
2110
    roledescription character varying(200),
2111
    roleproject integer,
2112
    roleobservation integer,
2113
    roletaxonint integer,
2114
    roleclassint integer,
2115
    accessioncode character varying(255)
2116
);
2117

  
2118

  
2119
--
2120
-- Name: role_role_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2121
--
2122

  
2123
CREATE SEQUENCE role_role_id_seq
2124
    START WITH 1
2125
    INCREMENT BY 1
2126
    NO MINVALUE
2127
    NO MAXVALUE
2128
    CACHE 1;
2129

  
2130

  
2131
--
2132
-- Name: role_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2133
--
2134

  
2135
ALTER SEQUENCE role_role_id_seq OWNED BY role.role_id;
2136

  
2137

  
2138 2138
SET default_with_oids = false;
2139 2139

  
2140 2140
--
......
3213 3213

  
3214 3214

  
3215 3215
--
3216
-- Name: role_id; Type: DEFAULT; Schema: public; Owner: -
3217
--
3218

  
3219
ALTER TABLE aux_role ALTER COLUMN role_id SET DEFAULT nextval('aux_role_role_id_seq'::regclass);
3220

  
3221

  
3222
--
3223 3216
-- Name: classcontributor_id; Type: DEFAULT; Schema: public; Owner: -
3224 3217
--
3225 3218

  
......
3577 3570

  
3578 3571

  
3579 3572
--
3573
-- Name: role_id; Type: DEFAULT; Schema: public; Owner: -
3574
--
3575

  
3576
ALTER TABLE role ALTER COLUMN role_id SET DEFAULT nextval('role_role_id_seq'::regclass);
3577

  
3578

  
3579
--
3580 3580
-- Name: sizeclass_id; Type: DEFAULT; Schema: public; Owner: -
3581 3581
--
3582 3582

  
......
3798 3798

  
3799 3799

  
3800 3800
--
3801
-- Name: aux_role_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3802
--
3803

  
3804
ALTER TABLE ONLY aux_role
3805
    ADD CONSTRAINT aux_role_pkey PRIMARY KEY (role_id);
3806

  
3807

  
3808
--
3809 3801
-- Name: classcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3810 3802
--
3811 3803

  
......
4350 4342

  
4351 4343

  
4352 4344
--
4345
-- Name: role_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4346
--
4347

  
4348
ALTER TABLE ONLY role
4349
    ADD CONSTRAINT role_pkey PRIMARY KEY (role_id);
4350

  
4351

  
4352
--
4353 4353
-- Name: sizeclass_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4354 4354
--
4355 4355

  
......
4666 4666

  
4667 4667

  
4668 4668
--
4669
-- Name: aux_role_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4670
--
4671

  
4672
CREATE UNIQUE INDEX aux_role_accessioncode_index ON aux_role USING btree (accessioncode);
4673

  
4674

  
4675
--
4676 4669
-- Name: classcontributor_commclass_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4677 4670
--
4678 4671

  
......
5555 5548

  
5556 5549

  
5557 5550
--
5551
-- Name: role_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5552
--
5553

  
5554
CREATE UNIQUE INDEX role_accessioncode_index ON role USING btree (accessioncode);
5555

  
5556

  
5557
--
5558 5558
-- Name: soilobs_locationevent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5559 5559
--
5560 5560

  
......
5887 5887
--
5888 5888

  
5889 5889
ALTER TABLE ONLY classcontributor
5890
    ADD CONSTRAINT classcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
5890
    ADD CONSTRAINT classcontributor_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
5891 5891

  
5892 5892

  
5893 5893
--
......
6199 6199
--
6200 6200

  
6201 6201
ALTER TABLE ONLY locationeventcontributor
6202
    ADD CONSTRAINT locationeventcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6202
    ADD CONSTRAINT locationeventcontributor_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6203 6203

  
6204 6204

  
6205 6205
--
......
6223 6223
--
6224 6224

  
6225 6225
ALTER TABLE ONLY locationeventsynonym
6226
    ADD CONSTRAINT locationeventsynonym_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6226
    ADD CONSTRAINT locationeventsynonym_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6227 6227

  
6228 6228

  
6229 6229
--
......
6295 6295
--
6296 6296

  
6297 6297
ALTER TABLE ONLY note
6298
    ADD CONSTRAINT note_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6298
    ADD CONSTRAINT note_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6299 6299

  
6300 6300

  
6301 6301
--
......
6327 6327
--
6328 6328

  
6329 6329
ALTER TABLE ONLY partymember
6330
    ADD CONSTRAINT partymember_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6330
    ADD CONSTRAINT partymember_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6331 6331

  
6332 6332

  
6333 6333
--
......
6471 6471
--
6472 6472

  
6473 6473
ALTER TABLE ONLY projectcontributor
6474
    ADD CONSTRAINT projectcontributor_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6474
    ADD CONSTRAINT projectcontributor_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6475 6475

  
6476 6476

  
6477 6477
--
......
6671 6671
--
6672 6672

  
6673 6673
ALTER TABLE ONLY taxondetermination
6674
    ADD CONSTRAINT taxondetermination_role_id FOREIGN KEY (role_id) REFERENCES aux_role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6674
    ADD CONSTRAINT taxondetermination_role_id FOREIGN KEY (role_id) REFERENCES role(role_id) ON UPDATE CASCADE ON DELETE CASCADE;
6675 6675

  
6676 6676

  
6677 6677
--

Also available in: Unified diff