Project

General

Profile

« Previous | Next » 

Revision 1221

vegbien.sql: userdefined: Made userdefinedname NOT NULL. userdefined, definedvalue: Added unique constraints.

View differences:

inputs/SALVIAS/test/import.organisms.out.ref
1
Inserted 63 new rows into database
1
Inserted 61 new rows into database
inputs/SALVIAS-CSV/test/import.organisms.out.ref
1
Inserted 58 new rows into database
1
Inserted 57 new rows into database
schemas/vegbien.my.sql
2281 2281

  
2282 2282
CREATE TABLE userdefined (
2283 2283
    userdefined_id int(11) NOT NULL,
2284
    userdefinedname text,
2284
    userdefinedname text NOT NULL,
2285 2285
    userdefinedmetadata text,
2286 2286
    userdefinedcategory text,
2287 2287
    userdefinedtype text DEFAULT 'text',
......
2920 2920

  
2921 2921

  
2922 2922
--
2923
-- Name: definedvalue_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
2924
--
2925

  
2926
ALTER TABLE definedvalue
2927
    ADD CONSTRAINT definedvalue_unique UNIQUE (userdefined_id, tablerecord_id);
2928

  
2929

  
2930
--
2923 2931
-- Name: disturbanceobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
2924 2932
--
2925 2933

  
......
3448 3456

  
3449 3457

  
3450 3458
--
3459
-- Name: userdefined_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3460
--
3461

  
3462
ALTER TABLE userdefined
3463
    ADD CONSTRAINT userdefined_unique UNIQUE (tablename, userdefinedname);
3464

  
3465

  
3466
--
3451 3467
-- Name: voucher_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3452 3468
--
3453 3469

  
schemas/vegbien.sql
2668 2668

  
2669 2669
CREATE TABLE userdefined (
2670 2670
    userdefined_id integer NOT NULL,
2671
    userdefinedname text,
2671
    userdefinedname text NOT NULL,
2672 2672
    userdefinedmetadata text,
2673 2673
    userdefinedcategory text,
2674 2674
    userdefinedtype text DEFAULT 'text'::text NOT NULL,
......
3317 3317

  
3318 3318

  
3319 3319
--
3320
-- Name: definedvalue_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3321
--
3322

  
3323
ALTER TABLE ONLY definedvalue
3324
    ADD CONSTRAINT definedvalue_unique UNIQUE (userdefined_id, tablerecord_id);
3325

  
3326

  
3327
--
3320 3328
-- Name: disturbanceobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3321 3329
--
3322 3330

  
......
3845 3853

  
3846 3854

  
3847 3855
--
3856
-- Name: userdefined_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3857
--
3858

  
3859
ALTER TABLE ONLY userdefined
3860
    ADD CONSTRAINT userdefined_unique UNIQUE (tablename, userdefinedname);
3861

  
3862

  
3863
--
3848 3864
-- Name: voucher_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3849 3865
--
3850 3866

  

Also available in: Unified diff