Project

General

Profile

1
SET standard_conforming_strings = off;
2
SET escape_string_warning = off;
3
SET standard_conforming_strings = off;
4
SET escape_string_warning = off;
5
-- MySQL dump 10.13  Distrib 5.5.29, for debian-linux-gnu (x86_64)
6
--
7
-- Host: localhost    Database: BRIT
8
-- ------------------------------------------------------
9
-- Server version	5.5.29-0ubuntu0.12.04.1
10

    
11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
12
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
13
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
14
SET NAMES 'latin1';
15
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
16
/*!40103 SET TIME_ZONE='+00:00' */;
17
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
18
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
19
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,POSTGRESQL' */;
20
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
21

    
22
--
23
-- Table structure for table "agent"
24
--
25

    
26
DROP TABLE IF EXISTS "agent";
27
/*!40101 SET @saved_cs_client     = @@character_set_client */;
28
/*!40101 SET character_set_client = utf8 */;
29
CREATE TABLE "agent" (
30
  "agent_id" integer NOT NULL,
31
  "first_name" varchar(60) DEFAULT NULL,
32
  "middle_name" varchar(60) DEFAULT NULL,
33
  "last_name" varchar(60) DEFAULT NULL,
34
  "institution" varchar(30) DEFAULT NULL,
35
  "institution_full" varchar(100) DEFAULT NULL,
36
  "annotator_abbrev_name" varchar(60) DEFAULT NULL,
37
  "taxon_author_abbrev_name" varchar(60) DEFAULT NULL,
38
  "collector_abbrev_name" varchar(60) DEFAULT NULL,
39
  "year_birth" integer DEFAULT NULL,
40
  "year_death" integer DEFAULT NULL,
41
  "notes" text,
42
  "added_date" timestamp DEFAULT NULL,
43
  "added_by_signon" varchar(30) DEFAULT NULL,
44
  "updated_date" timestamp DEFAULT NULL,
45
  "updated_by_signon" varchar(30) DEFAULT NULL,
46
  PRIMARY KEY ("agent_id"),
47
  /*KEY "collector_abbrev_name" ("collector_abbrev_name")*/CHECK (true)
48
);
49
/*!40101 SET character_set_client = @saved_cs_client */;
50

    
51
--
52
-- Table structure for table "analysis_scripts"
53
--
54

    
55
DROP TABLE IF EXISTS "analysis_scripts";
56
/*!40101 SET @saved_cs_client     = @@character_set_client */;
57
/*!40101 SET character_set_client = utf8 */;
58
CREATE TABLE "analysis_scripts" (
59
  "analysis_id" integer NOT NULL,
60
  "analysis_name" varchar(30) DEFAULT NULL,
61
  "analysis_script" text,
62
  "analysis_script_type" varchar(20) DEFAULT NULL,
63
  "analysis_input_parameters" text,
64
  "analysis_output_template" text,
65
  PRIMARY KEY ("analysis_id")
66
);
67
/*!40101 SET character_set_client = @saved_cs_client */;
68

    
69
--
70
-- Table structure for table "annotation_hist"
71
--
72

    
73
DROP TABLE IF EXISTS "annotation_hist";
74
/*!40101 SET @saved_cs_client     = @@character_set_client */;
75
/*!40101 SET character_set_client = utf8 */;
76
CREATE TABLE "annotation_hist" (
77
  "Annotation_History_ID" integer NOT NULL,
78
  "Determined_By_DateSent" varchar(60) DEFAULT NULL,
79
  "Determined_By_DateRecieved" varchar(60) DEFAULT NULL,
80
  "Added_Date" varchar(60) DEFAULT NULL,
81
  "Added_By_Signon" varchar(40) DEFAULT NULL,
82
  "Updated_Date" varchar(60) DEFAULT NULL,
83
  "Updated_By_Signon" varchar(40) DEFAULT NULL,
84
  "Determined_By_Date" varchar(30) DEFAULT NULL,
85
  "Determined_By_Institution" varchar(200) DEFAULT NULL,
86
  "Determination_Name" varchar(200) DEFAULT NULL,
87
  "Family_Name" varchar(40) DEFAULT NULL,
88
  "Genus_Name" varchar(40) DEFAULT NULL,
89
  "Specific_Epithet" varchar(60) DEFAULT NULL,
90
  "Infra_Epithet" varchar(40) DEFAULT NULL,
91
  "Species_ID" integer DEFAULT NULL,
92
  "Infraspecific_Taxon_ID" integer DEFAULT NULL,
93
  "taxon_id" integer DEFAULT NULL,
94
  "Determined_By_Name" varchar(200) DEFAULT NULL,
95
  "collection_lsid_object_id" varchar(15) DEFAULT NULL,
96
  "specimen_lsid_object_id" varchar(15) DEFAULT NULL,
97
  "specimen_number" integer DEFAULT NULL,
98
  "annotation_type" varchar(15) DEFAULT NULL,
99
  "Conf_Indicator" varchar(10) DEFAULT NULL,
100
  "Basis_Of_Determination" varchar(20) DEFAULT NULL,
101
  "Basis_Institution" varchar(200) DEFAULT NULL,
102
  "annotation_notes" text,
103
  "author" varchar(255) DEFAULT NULL,
104
  PRIMARY KEY ("Annotation_History_ID"),
105
  /*KEY "Species_ID" ("Species_ID")*/CHECK (true),
106
  /*KEY "Infraspecific_Taxon_ID" ("Infraspecific_Taxon_ID")*/CHECK (true),
107
  /*KEY "taxon_id" ("taxon_id")*/CHECK (true)
108
);
109
/*!40101 SET character_set_client = @saved_cs_client */;
110

    
111
--
112
-- Table structure for table "authority"
113
--
114

    
115
DROP TABLE IF EXISTS "authority";
116
/*!40101 SET @saved_cs_client     = @@character_set_client */;
117
/*!40101 SET character_set_client = utf8 */;
118
CREATE TABLE "authority" (
119
  "Authority_ID" integer NOT NULL,
120
  "Authority_Abbrev_Name" varchar(120) NOT NULL DEFAULT '',
121
  "Authority_Full_Name" varchar(200) DEFAULT NULL,
122
  "Authority_Statement" text,
123
  PRIMARY KEY ("Authority_ID"),
124
  /*CONSTRAINT "XPKAuthority" */UNIQUE ("Authority_ID")
125
);
126
/*!40101 SET character_set_client = @saved_cs_client */;
127

    
128
--
129
-- Table structure for table "collection"
130
--
131

    
132
DROP TABLE IF EXISTS "collection";
133
/*!40101 SET @saved_cs_client     = @@character_set_client */;
134
/*!40101 SET character_set_client = utf8 */;
135
CREATE TABLE "collection" (
136
  "Collection_ID" integer NOT NULL,
137
  "LSID_Object_ID" varchar(15) DEFAULT NULL,
138
  "LSID_Replaces_Object_ID" varchar(15) DEFAULT NULL,
139
  "LSID_Authority_ID" integer DEFAULT NULL,
140
  "LSID_Namespace_ID" integer DEFAULT NULL,
141
  "LSID_Name" varchar(150) DEFAULT NULL,
142
  "Collection_Version" integer DEFAULT NULL,
143
  "Published_Collection" integer DEFAULT NULL,
144
  "agent_id" integer DEFAULT NULL,
145
  "Collection_Number" varchar(20) DEFAULT NULL,
146
  "Collection_Team" varchar(255) DEFAULT NULL,
147
  "Annotation_History_ID" integer DEFAULT NULL,
148
  "Local_Name" varchar(60) DEFAULT NULL,
149
  "Date_of_Collection" varchar(60) DEFAULT NULL,
150
  "Basis_of_Collection" varchar(60) DEFAULT NULL,
151
  "Locality_Summary" varchar(60) DEFAULT NULL,
152
  "Locality_Description" text,
153
  "Locality_Site_Specific" varchar(120) DEFAULT NULL,
154
  "Closest_Town" varchar(60) DEFAULT NULL,
155
  "Subregion_ID" integer DEFAULT NULL,
156
  "Region_ID" integer DEFAULT NULL,
157
  "Country_ID" integer DEFAULT NULL,
158
  "Continent_ID" integer DEFAULT NULL,
159
  "Latitude" float DEFAULT NULL,
160
  "Longitude" float DEFAULT NULL,
161
  "Coordinate_Uncertainity" varchar(60) DEFAULT NULL,
162
  "Elevation_Min" float DEFAULT NULL,
163
  "Elevation_Max" float DEFAULT NULL,
164
  "Research_Site_ID" integer DEFAULT NULL,
165
  "Project_ID" integer DEFAULT NULL,
166
  "Habitat_Description" text,
167
  "Habitat_Summary" varchar(200) DEFAULT NULL,
168
  "Soil_Description" text,
169
  "Notes_Plant" text,
170
  "Height_Min" float DEFAULT NULL,
171
  "Height_Max" float DEFAULT NULL,
172
  "DBH_Min" float DEFAULT NULL,
173
  "DBH_Max" float DEFAULT NULL,
174
  "Added_Date" varchar(60) DEFAULT NULL,
175
  "Added_By_Signon" varchar(30) DEFAULT NULL,
176
  PRIMARY KEY ("Collection_ID"),
177
  /*KEY "Collection_LSID" ("LSID_Object_ID")*/CHECK (true),
178
  /*KEY "Continent_ID" ("Continent_ID")*/CHECK (true),
179
  /*KEY "Country_ID" ("Country_ID")*/CHECK (true),
180
  /*KEY "Collector_ID" ("agent_id")*/CHECK (true),
181
  /*KEY "Subregion_ID" ("Subregion_ID")*/CHECK (true),
182
  /*KEY "Research_Site_ID" ("Research_Site_ID")*/CHECK (true),
183
  /*KEY "Project_ID" ("Project_ID")*/CHECK (true),
184
  /*KEY "Annotation_History_ID" ("Annotation_History_ID")*/CHECK (true),
185
  /*KEY "Closeest_Town" ("Closest_Town")*/CHECK (true),
186
  /*KEY "date_of_collection" ("Date_of_Collection")*/CHECK (true),
187
  /*KEY "added_date" ("Added_Date")*/CHECK (true),
188
  /*KEY "collection_team" ("Collection_Team")*/CHECK (true),
189
  /*KEY "locality_summary" ("Locality_Summary")*/CHECK (true),
190
  /*KEY "latitude" ("Latitude")*/CHECK (true),
191
  /*KEY "longitude" ("Longitude")*/CHECK (true),
192
  /*KEY "elevation_min" ("Elevation_Min")*/CHECK (true),
193
  /*KEY "coordinate_uncertainity" ("Coordinate_Uncertainity")*/CHECK (true),
194
  /*KEY "local_name" ("Local_Name")*/CHECK (true),
195
  /*KEY "elevation_max" ("Elevation_Max")*/CHECK (true),
196
  /*KEY "Collection_Number" ("Collection_Number")*/CHECK (true)
197
);
198
/*!40101 SET character_set_client = @saved_cs_client */;
199

    
200
--
201
-- Table structure for table "collection_habit"
202
--
203

    
204
DROP TABLE IF EXISTS "collection_habit";
205
/*!40101 SET @saved_cs_client     = @@character_set_client */;
206
/*!40101 SET character_set_client = utf8 */;
207
CREATE TABLE "collection_habit" (
208
  "Habit_ID" integer DEFAULT NULL,
209
  "Collection_LSID_Object_ID" varchar(15) DEFAULT NULL,
210
  /*KEY "Habit_ID" ("Habit_ID")*/CHECK (true),
211
  /*KEY "Collection_LSID_num" ("Collection_LSID_Object_ID")*/CHECK (true)
212
);
213
/*!40101 SET character_set_client = @saved_cs_client */;
214

    
215
--
216
-- Table structure for table "collection_habitat"
217
--
218

    
219
DROP TABLE IF EXISTS "collection_habitat";
220
/*!40101 SET @saved_cs_client     = @@character_set_client */;
221
/*!40101 SET character_set_client = utf8 */;
222
CREATE TABLE "collection_habitat" (
223
  "Habitat_ID" integer DEFAULT NULL,
224
  "Collection_LSID_Object_ID" varchar(15) DEFAULT NULL,
225
  /*KEY "Habitat_ID" ("Habitat_ID")*/CHECK (true),
226
  /*KEY "Collection_LSID_num" ("Collection_LSID_Object_ID")*/CHECK (true)
227
);
228
/*!40101 SET character_set_client = @saved_cs_client */;
229

    
230
--
231
-- Table structure for table "contact_persons"
232
--
233

    
234
DROP TABLE IF EXISTS "contact_persons";
235
/*!40101 SET @saved_cs_client     = @@character_set_client */;
236
/*!40101 SET character_set_client = utf8 */;
237
CREATE TABLE "contact_persons" (
238
  "Contact_ID" integer NOT NULL,
239
  "First_Name" varchar(60) NOT NULL DEFAULT '',
240
  "Middle_Name" varchar(60) DEFAULT NULL,
241
  "Last_Name" varchar(60) DEFAULT NULL,
242
  "Title" varchar(60) DEFAULT NULL,
243
  "Position" varchar(60) DEFAULT NULL,
244
  "Organization_ID" text,
245
  "Address_Line1" varchar(60) DEFAULT NULL,
246
  "Address_Line2" varchar(60) DEFAULT NULL,
247
  "Address_Line3" varchar(60) DEFAULT NULL,
248
  "City" varchar(60) DEFAULT NULL,
249
  "Zip" varchar(20) DEFAULT NULL,
250
  "Region_ID" integer DEFAULT NULL,
251
  "Country_ID" integer DEFAULT NULL,
252
  "Phone1" varchar(20) DEFAULT NULL,
253
  "Phone2" varchar(20) DEFAULT NULL,
254
  "Fax" varchar(20) DEFAULT NULL,
255
  "Email" varchar(60) DEFAULT NULL,
256
  "URL" varchar(255) DEFAULT NULL,
257
  "Research" text,
258
  "Added_Date" varchar(60) DEFAULT NULL,
259
  "Added_By_Signon" varchar(10) DEFAULT NULL,
260
  "Notes" text,
261
  "Continent_ID" integer DEFAULT NULL,
262
  "Updated_Date" varchar(60) DEFAULT NULL,
263
  "Updated_By_Signon" varchar(60) DEFAULT NULL,
264
  PRIMARY KEY ("Contact_ID"),
265
  /*CONSTRAINT "XPKContact_Persons" */UNIQUE ("Contact_ID")
266
);
267
/*!40101 SET character_set_client = @saved_cs_client */;
268

    
269
--
270
-- Table structure for table "continent"
271
--
272

    
273
DROP TABLE IF EXISTS "continent";
274
/*!40101 SET @saved_cs_client     = @@character_set_client */;
275
/*!40101 SET character_set_client = utf8 */;
276
CREATE TABLE "continent" (
277
  "Continent_ID" integer NOT NULL,
278
  "Continent_Name" varchar(60) DEFAULT NULL,
279
  PRIMARY KEY ("Continent_ID")
280
);
281
/*!40101 SET character_set_client = @saved_cs_client */;
282

    
283
--
284
-- Table structure for table "country"
285
--
286

    
287
DROP TABLE IF EXISTS "country";
288
/*!40101 SET @saved_cs_client     = @@character_set_client */;
289
/*!40101 SET character_set_client = utf8 */;
290
CREATE TABLE "country" (
291
  "Country_ID" integer NOT NULL,
292
  "Country_Name" varchar(60) NOT NULL DEFAULT '',
293
  "Continent_ID" integer NOT NULL DEFAULT '0',
294
  PRIMARY KEY ("Country_ID"),
295
  /*KEY "Continent_ID" ("Continent_ID")*/CHECK (true)
296
);
297
/*!40101 SET character_set_client = @saved_cs_client */;
298

    
299
--
300
-- Table structure for table "custom_field_associations"
301
--
302

    
303
DROP TABLE IF EXISTS "custom_field_associations";
304
/*!40101 SET @saved_cs_client     = @@character_set_client */;
305
/*!40101 SET character_set_client = utf8 */;
306
CREATE TABLE "custom_field_associations" (
307
  "structure_id" integer DEFAULT NULL,
308
  "target_id" integer DEFAULT NULL,
309
  "target_type" varchar(30) DEFAULT NULL,
310
  /*KEY "structure_id" ("structure_id")*/CHECK (true),
311
  /*KEY "target_id" ("target_id")*/CHECK (true)
312
);
313
/*!40101 SET character_set_client = @saved_cs_client */;
314

    
315
--
316
-- Table structure for table "custom_field_data"
317
--
318

    
319
DROP TABLE IF EXISTS "custom_field_data";
320
/*!40101 SET @saved_cs_client     = @@character_set_client */;
321
/*!40101 SET character_set_client = utf8 */;
322
CREATE TABLE "custom_field_data" (
323
  "id" integer NOT NULL,
324
  "structure_id" integer DEFAULT NULL,
325
  "target_id" integer DEFAULT NULL,
326
  "data_id" integer DEFAULT NULL,
327
  PRIMARY KEY ("id"),
328
  /*KEY "structure_id" ("structure_id")*/CHECK (true),
329
  /*KEY "target_id" ("target_id")*/CHECK (true),
330
  /*KEY "data_id" ("data_id")*/CHECK (true)
331
);
332
/*!40101 SET character_set_client = @saved_cs_client */;
333

    
334
--
335
-- Table structure for table "custom_field_definition"
336
--
337

    
338
DROP TABLE IF EXISTS "custom_field_definition";
339
/*!40101 SET @saved_cs_client     = @@character_set_client */;
340
/*!40101 SET character_set_client = utf8 */;
341
CREATE TABLE "custom_field_definition" (
342
  "definition_id" integer NOT NULL,
343
  "field_name" varchar(60) DEFAULT NULL,
344
  "control_type" varchar(20) DEFAULT NULL,
345
  "default_values" text,
346
  "description" text,
347
  "data_type" varchar(20) DEFAULT NULL,
348
  "unit_type" varchar(20) DEFAULT NULL,
349
  "field_authority" varchar(100) DEFAULT NULL,
350
  "field_authority_uri" varchar(256) DEFAULT NULL,
351
  "added_by_signon" varchar(30) DEFAULT NULL,
352
  "added_by_date" timestamp DEFAULT NULL,
353
  "updated_by_signon" varchar(30) DEFAULT NULL,
354
  "updated_by_date" timestamp DEFAULT NULL,
355
  PRIMARY KEY ("definition_id")
356
);
357
/*!40101 SET character_set_client = @saved_cs_client */;
358

    
359
--
360
-- Table structure for table "custom_field_group"
361
--
362

    
363
DROP TABLE IF EXISTS "custom_field_group";
364
/*!40101 SET @saved_cs_client     = @@character_set_client */;
365
/*!40101 SET character_set_client = utf8 */;
366
CREATE TABLE "custom_field_group" (
367
  "group_id" integer NOT NULL,
368
  "group_name" varchar(60) DEFAULT NULL,
369
  "group_weight" integer DEFAULT NULL,
370
  "description" text,
371
  "added_by_signon" varchar(30) DEFAULT NULL,
372
  "added_by_date" timestamp DEFAULT NULL,
373
  "updated_by_signon" varchar(30) DEFAULT NULL,
374
  "updated_by_date" timestamp DEFAULT NULL,
375
  PRIMARY KEY ("group_id")
376
);
377
/*!40101 SET character_set_client = @saved_cs_client */;
378

    
379
--
380
-- Table structure for table "custom_field_structure"
381
--
382

    
383
DROP TABLE IF EXISTS "custom_field_structure";
384
/*!40101 SET @saved_cs_client     = @@character_set_client */;
385
/*!40101 SET character_set_client = utf8 */;
386
CREATE TABLE "custom_field_structure" (
387
  "structure_id" integer NOT NULL,
388
  "taxon_id" integer DEFAULT NULL,
389
  "taxon_rank_id" integer DEFAULT NULL,
390
  "definition_id" integer DEFAULT NULL,
391
  "group_id" integer DEFAULT NULL,
392
  "field_weight" integer DEFAULT NULL,
393
  "hidden_flag" integer DEFAULT NULL,
394
  "key_flag" integer DEFAULT NULL,
395
  "filter_flag" integer DEFAULT NULL,
396
  "added_by_signon" varchar(30) DEFAULT NULL,
397
  "added_by_date" timestamp DEFAULT NULL,
398
  "updated_by_signon" varchar(30) DEFAULT NULL,
399
  "updated_by_date" timestamp DEFAULT NULL,
400
  PRIMARY KEY ("structure_id")
401
);
402
/*!40101 SET character_set_client = @saved_cs_client */;
403

    
404
--
405
-- Table structure for table "custom_fields_datetime"
406
--
407

    
408
DROP TABLE IF EXISTS "custom_fields_datetime";
409
/*!40101 SET @saved_cs_client     = @@character_set_client */;
410
/*!40101 SET character_set_client = utf8 */;
411
CREATE TABLE "custom_fields_datetime" (
412
  "id" integer NOT NULL,
413
  "value" timestamp DEFAULT NULL,
414
  PRIMARY KEY ("id")
415
);
416
/*!40101 SET character_set_client = @saved_cs_client */;
417

    
418
--
419
-- Table structure for table "custom_fields_float"
420
--
421

    
422
DROP TABLE IF EXISTS "custom_fields_float";
423
/*!40101 SET @saved_cs_client     = @@character_set_client */;
424
/*!40101 SET character_set_client = utf8 */;
425
CREATE TABLE "custom_fields_float" (
426
  "id" integer NOT NULL,
427
  "value" float DEFAULT NULL,
428
  PRIMARY KEY ("id")
429
);
430
/*!40101 SET character_set_client = @saved_cs_client */;
431

    
432
--
433
-- Table structure for table "custom_fields_integer"
434
--
435

    
436
DROP TABLE IF EXISTS "custom_fields_integer";
437
/*!40101 SET @saved_cs_client     = @@character_set_client */;
438
/*!40101 SET character_set_client = utf8 */;
439
CREATE TABLE "custom_fields_integer" (
440
  "id" integer NOT NULL,
441
  "value" integer DEFAULT NULL,
442
  PRIMARY KEY ("id")
443
);
444
/*!40101 SET character_set_client = @saved_cs_client */;
445

    
446
--
447
-- Table structure for table "custom_fields_text"
448
--
449

    
450
DROP TABLE IF EXISTS "custom_fields_text";
451
/*!40101 SET @saved_cs_client     = @@character_set_client */;
452
/*!40101 SET character_set_client = utf8 */;
453
CREATE TABLE "custom_fields_text" (
454
  "id" integer NOT NULL,
455
  "value" text,
456
  PRIMARY KEY ("id")
457
);
458
/*!40101 SET character_set_client = @saved_cs_client */;
459

    
460
--
461
-- Table structure for table "custom_fields_url"
462
--
463

    
464
DROP TABLE IF EXISTS "custom_fields_url";
465
/*!40101 SET @saved_cs_client     = @@character_set_client */;
466
/*!40101 SET character_set_client = utf8 */;
467
CREATE TABLE "custom_fields_url" (
468
  "id" integer NOT NULL,
469
  "value" text,
470
  PRIMARY KEY ("id")
471
);
472
/*!40101 SET character_set_client = @saved_cs_client */;
473

    
474
--
475
-- Table structure for table "custom_fields_varchar"
476
--
477

    
478
DROP TABLE IF EXISTS "custom_fields_varchar";
479
/*!40101 SET @saved_cs_client     = @@character_set_client */;
480
/*!40101 SET character_set_client = utf8 */;
481
CREATE TABLE "custom_fields_varchar" (
482
  "id" integer NOT NULL,
483
  "value" varchar(100) DEFAULT NULL,
484
  PRIMARY KEY ("id")
485
);
486
/*!40101 SET character_set_client = @saved_cs_client */;
487

    
488
--
489
-- Table structure for table "debug_output"
490
--
491

    
492
DROP TABLE IF EXISTS "debug_output";
493
/*!40101 SET @saved_cs_client     = @@character_set_client */;
494
/*!40101 SET character_set_client = utf8 */;
495
CREATE TABLE "debug_output" (
496
  "debug_string" varchar(120) DEFAULT NULL,
497
  "timestamp" timestamp DEFAULT NULL
498
);
499
/*!40101 SET character_set_client = @saved_cs_client */;
500

    
501
--
502
-- Table structure for table "ecoregion"
503
--
504

    
505
DROP TABLE IF EXISTS "ecoregion";
506
/*!40101 SET @saved_cs_client     = @@character_set_client */;
507
/*!40101 SET character_set_client = utf8 */;
508
CREATE TABLE "ecoregion" (
509
  "Ecoregion_ID" integer NOT NULL,
510
  "Eco_ID" integer DEFAULT NULL,
511
  "Realm" varchar(20) DEFAULT NULL,
512
  "Bio" varchar(60) DEFAULT NULL,
513
  "Eco_Num" integer DEFAULT NULL,
514
  "Eco_Code" varchar(10) DEFAULT NULL,
515
  "Eco_Name" varchar(100) DEFAULT NULL,
516
  "GBL_Stat" varchar(30) DEFAULT NULL,
517
  "G200_Region" varchar(60) DEFAULT NULL,
518
  "G200_Bio" varchar(60) DEFAULT NULL,
519
  "G200_Stat" varchar(30) DEFAULT NULL,
520
  "G200_Num" integer DEFAULT NULL,
521
  /*CONSTRAINT "XPKEcoregion" */UNIQUE ("Ecoregion_ID"),
522
  /*KEY "Eco_ID" ("Eco_ID")*/CHECK (true)
523
);
524
/*!40101 SET character_set_client = @saved_cs_client */;
525

    
526
--
527
-- Table structure for table "glossary"
528
--
529

    
530
DROP TABLE IF EXISTS "glossary";
531
/*!40101 SET @saved_cs_client     = @@character_set_client */;
532
/*!40101 SET character_set_client = utf8 */;
533
CREATE TABLE "glossary" (
534
  "Term" varchar(60) NOT NULL DEFAULT '',
535
  "Synonyms" varchar(60) DEFAULT NULL,
536
  "Category" varchar(60) DEFAULT NULL,
537
  "Limitation" varchar(60) DEFAULT NULL,
538
  "Definition" text,
539
  /*CONSTRAINT "XPKGlossary" */UNIQUE ("Term")
540
);
541
/*!40101 SET character_set_client = @saved_cs_client */;
542

    
543
--
544
-- Table structure for table "habit"
545
--
546

    
547
DROP TABLE IF EXISTS "habit";
548
/*!40101 SET @saved_cs_client     = @@character_set_client */;
549
/*!40101 SET character_set_client = utf8 */;
550
CREATE TABLE "habit" (
551
  "Habit_ID" integer NOT NULL,
552
  "Habit_Description" text,
553
  "Habit_Name" varchar(60) DEFAULT NULL,
554
  PRIMARY KEY ("Habit_ID")
555
);
556
/*!40101 SET character_set_client = @saved_cs_client */;
557

    
558
--
559
-- Table structure for table "habitat"
560
--
561

    
562
DROP TABLE IF EXISTS "habitat";
563
/*!40101 SET @saved_cs_client     = @@character_set_client */;
564
/*!40101 SET character_set_client = utf8 */;
565
CREATE TABLE "habitat" (
566
  "Habitat_ID" integer NOT NULL,
567
  "Habitat_Description" text,
568
  "Habitat_Name" varchar(60) DEFAULT NULL,
569
  PRIMARY KEY ("Habitat_ID")
570
);
571
/*!40101 SET character_set_client = @saved_cs_client */;
572

    
573
--
574
-- Table structure for table "herbarium_contact"
575
--
576

    
577
DROP TABLE IF EXISTS "herbarium_contact";
578
/*!40101 SET @saved_cs_client     = @@character_set_client */;
579
/*!40101 SET character_set_client = utf8 */;
580
CREATE TABLE "herbarium_contact" (
581
  "Herbarium_Contact_ID" integer NOT NULL DEFAULT '0',
582
  "Function" varchar(60) DEFAULT NULL,
583
  "Contact_ID" integer DEFAULT NULL,
584
  "Notes" text,
585
  /*CONSTRAINT "XPKHerbarium_Contact" */UNIQUE ("Herbarium_Contact_ID")
586
);
587
/*!40101 SET character_set_client = @saved_cs_client */;
588

    
589
--
590
-- Table structure for table "image_category"
591
--
592

    
593
DROP TABLE IF EXISTS "image_category";
594
/*!40101 SET @saved_cs_client     = @@character_set_client */;
595
/*!40101 SET character_set_client = utf8 */;
596
CREATE TABLE "image_category" (
597
  "Image_Category_ID" integer NOT NULL,
598
  "Image_Category" varchar(60) DEFAULT NULL,
599
  "Image_Category_Description" text,
600
  PRIMARY KEY ("Image_Category_ID"),
601
  /*CONSTRAINT "XPKImage_Category" */UNIQUE ("Image_Category_ID")
602
);
603
/*!40101 SET character_set_client = @saved_cs_client */;
604

    
605
--
606
-- Table structure for table "image_management"
607
--
608

    
609
DROP TABLE IF EXISTS "image_management";
610
/*!40101 SET @saved_cs_client     = @@character_set_client */;
611
/*!40101 SET character_set_client = utf8 */;
612
CREATE TABLE "image_management" (
613
  "imt_id" integer NOT NULL DEFAULT '0',
614
  "imt_notes" text,
615
  "imt_hidden_flag" integer DEFAULT NULL,
616
  "imt_added_by" varchar(20) DEFAULT NULL,
617
  "imt_added_date" varchar(40) DEFAULT NULL,
618
  "imt_updated_by" varchar(20) DEFAULT NULL,
619
  "imt_updated_date" varchar(40) DEFAULT NULL,
620
  PRIMARY KEY ("imt_id")
621
);
622
/*!40101 SET character_set_client = @saved_cs_client */;
623

    
624
--
625
-- Table structure for table "images"
626
--
627

    
628
DROP TABLE IF EXISTS "images";
629
/*!40101 SET @saved_cs_client     = @@character_set_client */;
630
/*!40101 SET character_set_client = utf8 */;
631
CREATE TABLE "images" (
632
  "Image_ID" integer NOT NULL,
633
  "Image_Name" varchar(100) DEFAULT NULL,
634
  "Image_Path_New" varchar(60) DEFAULT NULL,
635
  "Image_Path_Old" varchar(120) DEFAULT NULL,
636
  "Creator" varchar(100) DEFAULT NULL,
637
  "Headline" varchar(255) DEFAULT NULL,
638
  "Title" varchar(255) DEFAULT NULL,
639
  "Caption" text,
640
  "Keywords" varchar(255) DEFAULT NULL,
641
  "Source" varchar(60) DEFAULT NULL,
642
  "Credit" varchar(255) DEFAULT NULL,
643
  "Copyright" varchar(120) DEFAULT NULL,
644
  "Usage_Terms" text,
645
  "Instructions" text,
646
  "Create_Date" varchar(60) DEFAULT NULL,
647
  "Country" varchar(100) DEFAULT NULL,
648
  "Region" varchar(100) DEFAULT NULL,
649
  "Locality_Description" text,
650
  "Latitude" float DEFAULT NULL,
651
  "Longitude" float DEFAULT NULL,
652
  "EXIF" text,
653
  "Original_Width" integer DEFAULT NULL,
654
  "Original_Height" integer DEFAULT NULL,
655
  "Original_Scale" float DEFAULT NULL,
656
  "Image_Category_ID" integer DEFAULT NULL,
657
  "collection_lsid_object_id" varchar(15) DEFAULT NULL,
658
  "specimen_lsid_object_id" varchar(15) DEFAULT NULL,
659
  "veg_survey_id" integer DEFAULT NULL,
660
  "taxon_id" integer DEFAULT NULL,
661
  "added_by_signon" varchar(30) DEFAULT NULL,
662
  "added_date" timestamp DEFAULT NULL,
663
  "updated_by_signon" varchar(30) DEFAULT NULL,
664
  "updated_date" timestamp DEFAULT NULL,
665
  PRIMARY KEY ("Image_ID"),
666
  /*CONSTRAINT "XPKImages" */UNIQUE ("Image_ID"),
667
  /*KEY "Collection_LSID" ("collection_lsid_object_id")*/CHECK (true),
668
  /*KEY "Image_Category_ID" ("Image_Category_ID")*/CHECK (true),
669
  /*KEY "Specimen_LSID" ("specimen_lsid_object_id")*/CHECK (true)
670
);
671
/*!40101 SET character_set_client = @saved_cs_client */;
672

    
673
--
674
-- Table structure for table "institution"
675
--
676

    
677
DROP TABLE IF EXISTS "institution";
678
/*!40101 SET @saved_cs_client     = @@character_set_client */;
679
/*!40101 SET character_set_client = utf8 */;
680
CREATE TABLE "institution" (
681
  "Institution_ID" integer NOT NULL,
682
  "Name" varchar(255) DEFAULT NULL,
683
  "Abbreviation" varchar(30) DEFAULT NULL,
684
  "Institution" varchar(255) DEFAULT NULL,
685
  "Address_Line1" varchar(120) DEFAULT NULL,
686
  "Address_Line2" varchar(120) DEFAULT NULL,
687
  "Address_Line3" varchar(120) DEFAULT NULL,
688
  "City" varchar(60) DEFAULT NULL,
689
  "Zip" varchar(15) DEFAULT NULL,
690
  "Region_ID" integer DEFAULT NULL,
691
  "State_Province" varchar(60) DEFAULT NULL,
692
  "Country_ID" integer DEFAULT NULL,
693
  "Continent_ID" integer DEFAULT NULL,
694
  "Contact" varchar(60) DEFAULT NULL,
695
  "Phone1" varchar(20) DEFAULT NULL,
696
  "Phone2" varchar(20) DEFAULT NULL,
697
  "Fax" varchar(20) DEFAULT NULL,
698
  "Email" varchar(30) DEFAULT NULL,
699
  "URL" varchar(255) DEFAULT NULL,
700
  "Category" varchar(60) DEFAULT NULL,
701
  "Notes" text,
702
  PRIMARY KEY ("Institution_ID"),
703
  /*KEY "XPKOrganization" ("Institution_ID")*/CHECK (true)
704
);
705
/*!40101 SET character_set_client = @saved_cs_client */;
706

    
707
--
708
-- Table structure for table "languages"
709
--
710

    
711
DROP TABLE IF EXISTS "languages";
712
/*!40101 SET @saved_cs_client     = @@character_set_client */;
713
/*!40101 SET character_set_client = utf8 */;
714
CREATE TABLE "languages" (
715
  "language_id" integer NOT NULL,
716
  "language_name" varchar(30) DEFAULT NULL,
717
  PRIMARY KEY ("language_id")
718
);
719
/*!40101 SET character_set_client = @saved_cs_client */;
720

    
721
--
722
-- Table structure for table "life_zone"
723
--
724

    
725
DROP TABLE IF EXISTS "life_zone";
726
/*!40101 SET @saved_cs_client     = @@character_set_client */;
727
/*!40101 SET character_set_client = utf8 */;
728
CREATE TABLE "life_zone" (
729
  "Life_Zone_ID" integer NOT NULL,
730
  "Life_Zone_Name" varchar(60) DEFAULT NULL,
731
  "Life_Zone_Code" varchar(10) DEFAULT NULL,
732
  /*CONSTRAINT "XPKLife_Zone" */UNIQUE ("Life_Zone_ID")
733
);
734
/*!40101 SET character_set_client = @saved_cs_client */;
735

    
736
--
737
-- Table structure for table "literature"
738
--
739

    
740
DROP TABLE IF EXISTS "literature";
741
/*!40101 SET @saved_cs_client     = @@character_set_client */;
742
/*!40101 SET character_set_client = utf8 */;
743
CREATE TABLE "literature" (
744
  "Literature_ID" integer NOT NULL,
745
  "Type" integer DEFAULT NULL,
746
  "Author" text,
747
  "Editor" text,
748
  "Year" integer DEFAULT NULL,
749
  "Title" text,
750
  "Series_Editor" text,
751
  "Series_Title" varchar(50) DEFAULT NULL,
752
  "Short_Title" text,
753
  "Volume" varchar(15) DEFAULT NULL,
754
  "Edition" varchar(30) DEFAULT NULL,
755
  "Issue" varchar(30) DEFAULT NULL,
756
  "Pages" varchar(30) DEFAULT NULL,
757
  "Secondary_Title" text,
758
  "Alt_Journal" text,
759
  "Publisher" text,
760
  "City" varchar(30) DEFAULT NULL,
761
  "University" varchar(50) DEFAULT NULL,
762
  "ISSN" varchar(50) DEFAULT NULL,
763
  "ISBN" varchar(30) DEFAULT NULL,
764
  "Date" varchar(60) DEFAULT NULL,
765
  "Thesis_Type" varchar(30) DEFAULT NULL,
766
  "Keywords" text,
767
  "Abstract" text,
768
  "Notes" text,
769
  "Doc_URL" text,
770
  "Doc_Name" text,
771
  "Doc_Path" varchar(60) DEFAULT NULL,
772
  "Language" varchar(20) DEFAULT NULL,
773
  "Plot_ID" integer DEFAULT NULL,
774
  "Added_By_Signon" varchar(40) DEFAULT NULL,
775
  "Added_Date" varchar(60) DEFAULT NULL,
776
  "Updated_By_Signon" varchar(40) DEFAULT NULL,
777
  "Updated_Date" varchar(60) DEFAULT NULL,
778
  "published" integer DEFAULT NULL,
779
  PRIMARY KEY ("Literature_ID"),
780
  /*CONSTRAINT "XPKLiterature" */UNIQUE ("Literature_ID")
781
);
782
/*!40101 SET character_set_client = @saved_cs_client */;
783

    
784
--
785
-- Table structure for table "literature_contact"
786
--
787

    
788
DROP TABLE IF EXISTS "literature_contact";
789
/*!40101 SET @saved_cs_client     = @@character_set_client */;
790
/*!40101 SET character_set_client = utf8 */;
791
CREATE TABLE "literature_contact" (
792
  "Contact_ID" integer NOT NULL DEFAULT '0',
793
  "Literature_ID" integer NOT NULL DEFAULT '0',
794
  /*CONSTRAINT "XPKLiteratur_Contact" */UNIQUE ("Contact_ID","Literature_ID")
795
);
796
/*!40101 SET character_set_client = @saved_cs_client */;
797

    
798
--
799
-- Table structure for table "literature_family"
800
--
801

    
802
DROP TABLE IF EXISTS "literature_family";
803
/*!40101 SET @saved_cs_client     = @@character_set_client */;
804
/*!40101 SET character_set_client = utf8 */;
805
CREATE TABLE "literature_family" (
806
  "Family_ID" integer NOT NULL DEFAULT '0',
807
  "Literature_ID" integer NOT NULL DEFAULT '0',
808
  /*CONSTRAINT "XPKLiterature_Family" */UNIQUE ("Family_ID","Literature_ID")
809
);
810
/*!40101 SET character_set_client = @saved_cs_client */;
811

    
812
--
813
-- Table structure for table "local_names"
814
--
815

    
816
DROP TABLE IF EXISTS "local_names";
817
/*!40101 SET @saved_cs_client     = @@character_set_client */;
818
/*!40101 SET character_set_client = utf8 */;
819
CREATE TABLE "local_names" (
820
  "Local_Name_ID" integer NOT NULL,
821
  "Local_Name" varchar(60) DEFAULT NULL,
822
  "Language" varchar(60) DEFAULT NULL,
823
  "Country_ID" integer DEFAULT NULL,
824
  "Species_ID" integer DEFAULT NULL,
825
  "Specimen_ID" integer DEFAULT NULL,
826
  PRIMARY KEY ("Local_Name_ID"),
827
  /*CONSTRAINT "XPKLocal_Names" */UNIQUE ("Local_Name_ID")
828
);
829
/*!40101 SET character_set_client = @saved_cs_client */;
830

    
831
--
832
-- Table structure for table "localized_strings"
833
--
834

    
835
DROP TABLE IF EXISTS "localized_strings";
836
/*!40101 SET @saved_cs_client     = @@character_set_client */;
837
/*!40101 SET character_set_client = utf8 */;
838
CREATE TABLE "localized_strings" (
839
  "string_id" integer NOT NULL,
840
  "page_name" varchar(60) DEFAULT NULL,
841
  "string_name" varchar(10) DEFAULT NULL,
842
  "string_tag" varchar(10) DEFAULT NULL,
843
  "language" varchar(20) DEFAULT NULL,
844
  "localized_string" text,
845
  PRIMARY KEY ("string_id")
846
);
847
/*!40101 SET character_set_client = @saved_cs_client */;
848

    
849
--
850
-- Table structure for table "lsid_authority"
851
--
852

    
853
DROP TABLE IF EXISTS "lsid_authority";
854
/*!40101 SET @saved_cs_client     = @@character_set_client */;
855
/*!40101 SET character_set_client = utf8 */;
856
CREATE TABLE "lsid_authority" (
857
  "authority_id" integer NOT NULL,
858
  "authority_text" varchar(60) DEFAULT NULL,
859
  "authority_description" text,
860
  PRIMARY KEY ("authority_id")
861
);
862
/*!40101 SET character_set_client = @saved_cs_client */;
863

    
864
--
865
-- Table structure for table "lsid_namespace"
866
--
867

    
868
DROP TABLE IF EXISTS "lsid_namespace";
869
/*!40101 SET @saved_cs_client     = @@character_set_client */;
870
/*!40101 SET character_set_client = utf8 */;
871
CREATE TABLE "lsid_namespace" (
872
  "namespace_id" integer NOT NULL,
873
  "namespace_text" varchar(60) DEFAULT NULL,
874
  "namespace_description" text,
875
  PRIMARY KEY ("namespace_id")
876
);
877
/*!40101 SET character_set_client = @saved_cs_client */;
878

    
879
--
880
-- Table structure for table "metadata"
881
--
882

    
883
DROP TABLE IF EXISTS "metadata";
884
/*!40101 SET @saved_cs_client     = @@character_set_client */;
885
/*!40101 SET character_set_client = utf8 */;
886
CREATE TABLE "metadata" (
887
  "DatasetID" integer NOT NULL,
888
  "ResTitle" varchar(200) DEFAULT NULL,
889
  "ResAltTitle" text,
890
  "IdAbs" text,
891
  "WestBL" float DEFAULT NULL,
892
  "EastBL" float DEFAULT NULL,
893
  "NorthBL" float DEFAULT NULL,
894
  "SouthBL" float DEFAULT NULL,
895
  "CreateDate" timestamp DEFAULT NULL,
896
  "SpatRepTypeCd" varchar(20) DEFAULT NULL,
897
  "ContentType" integer DEFAULT NULL,
898
  "ImageType" varchar(20) DEFAULT NULL,
899
  "ImagePath" integer DEFAULT NULL,
900
  "ImageRow" integer DEFAULT NULL,
901
  "FormatName" varchar(20) DEFAULT NULL,
902
  "MetXML" text,
903
  "FileName" varchar(255) DEFAULT NULL,
904
  "FileSize" integer DEFAULT NULL,
905
  "FileSizeZip" integer DEFAULT NULL,
906
  "OriginalFileName" varchar(255) DEFAULT NULL,
907
  "ImageFileName" varchar(255) DEFAULT NULL,
908
  "ThumbFileName" varchar(255) DEFAULT NULL,
909
  "Keywords1" text,
910
  "Keywords2" text,
911
  "Keywords3" text,
912
  "Keywords4" text,
913
  "Keywords5" text,
914
  "TopicCatCd" varchar(255) DEFAULT NULL,
915
  "DateCreate" varchar(60) DEFAULT NULL,
916
  "UserCreate" varchar(20) DEFAULT NULL,
917
  "DateLastChange" varchar(60) DEFAULT NULL,
918
  "UserLastChange" varchar(20) DEFAULT NULL,
919
  "PublishDate" varchar(60) DEFAULT NULL,
920
  "plot_id" integer DEFAULT NULL,
921
  PRIMARY KEY ("DatasetID"),
922
  /*KEY "Plot_ID" ("plot_id")*/CHECK (true)
923
);
924
/*!40101 SET character_set_client = @saved_cs_client */;
925

    
926
--
927
-- Table structure for table "meteo_data"
928
--
929

    
930
DROP TABLE IF EXISTS "meteo_data";
931
/*!40101 SET @saved_cs_client     = @@character_set_client */;
932
/*!40101 SET character_set_client = utf8 */;
933
CREATE TABLE "meteo_data" (
934
  "Meteo_Data_ID" bigint NOT NULL,
935
  "Station_ID" integer NOT NULL DEFAULT '0',
936
  "Reading_Datetime" timestamp NOT NULL DEFAULT '-infinity',
937
  "Temperature" float DEFAULT NULL,
938
  "Precipitation" float DEFAULT NULL,
939
  "Humidity" float DEFAULT NULL,
940
  "Wind_Direction" float DEFAULT NULL,
941
  "Wind_Gust" float DEFAULT NULL,
942
  "Wind_Speed" float DEFAULT NULL,
943
  "Atmospheric_Pressure" float DEFAULT NULL,
944
  "Solar_Radiation" float DEFAULT NULL,
945
  "PAR" float DEFAULT NULL,
946
  "Evapotranspiration" float DEFAULT NULL,
947
  "Soil_Moisture_A" float DEFAULT NULL,
948
  "Soil_Temperature_A" float DEFAULT NULL,
949
  "Soil_Moisture_B" float DEFAULT NULL,
950
  "Soil_Temperature_B" float DEFAULT NULL,
951
  "Water_Level" float DEFAULT NULL,
952
  PRIMARY KEY ("Meteo_Data_ID"),
953
  /*CONSTRAINT "XPKMeteo_Data" */UNIQUE ("Meteo_Data_ID","Station_ID"),
954
  /*KEY "Station_ID" ("Station_ID")*/CHECK (true)
955
);
956
/*!40101 SET character_set_client = @saved_cs_client */;
957

    
958
--
959
-- Table structure for table "meteo_images"
960
--
961

    
962
DROP TABLE IF EXISTS "meteo_images";
963
/*!40101 SET @saved_cs_client     = @@character_set_client */;
964
/*!40101 SET character_set_client = utf8 */;
965
CREATE TABLE "meteo_images" (
966
  "image_id" integer NOT NULL,
967
  "station_id" integer NOT NULL DEFAULT '0',
968
  "image_path" text,
969
  "image_description" text,
970
  PRIMARY KEY ("image_id"),
971
  /*KEY "station_id" ("station_id")*/CHECK (true)
972
);
973
/*!40101 SET character_set_client = @saved_cs_client */;
974

    
975
--
976
-- Table structure for table "meteo_missing_data"
977
--
978

    
979
DROP TABLE IF EXISTS "meteo_missing_data";
980
/*!40101 SET @saved_cs_client     = @@character_set_client */;
981
/*!40101 SET character_set_client = utf8 */;
982
CREATE TABLE "meteo_missing_data" (
983
  "meteo_data_id" integer DEFAULT NULL,
984
  "station_id" integer DEFAULT NULL,
985
  "data_type" varchar(40) DEFAULT NULL,
986
  "current_datetime" varchar(40) DEFAULT NULL,
987
  "prior_datetime" varchar(40) DEFAULT NULL,
988
  "curr_timestamp" varchar(40) DEFAULT NULL,
989
  "prior_timestamp" varchar(40) DEFAULT NULL,
990
  "time_difference" integer DEFAULT NULL,
991
  /*KEY "station_id" ("station_id")*/CHECK (true)
992
);
993
/*!40101 SET character_set_client = @saved_cs_client */;
994

    
995
--
996
-- Table structure for table "meteo_station"
997
--
998

    
999
DROP TABLE IF EXISTS "meteo_station";
1000
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1001
/*!40101 SET character_set_client = utf8 */;
1002
CREATE TABLE "meteo_station" (
1003
  "Station_ID" integer NOT NULL,
1004
  "Name" varchar(60) DEFAULT NULL,
1005
  "Description" text,
1006
  "Instrument_Manufacturer" varchar(120) DEFAULT NULL,
1007
  "Instrument_Model" varchar(120) DEFAULT NULL,
1008
  "Instrument_Serial_Number" varchar(60) DEFAULT NULL,
1009
  "File_Format" varchar(30) DEFAULT NULL,
1010
  "Location" varchar(60) DEFAULT NULL,
1011
  "Country_ID" integer DEFAULT NULL,
1012
  "Region_ID" integer DEFAULT NULL,
1013
  "Latitude" float DEFAULT NULL,
1014
  "Longitude" float DEFAULT NULL,
1015
  "Elevation" float DEFAULT NULL,
1016
  "Start_Date" varchar(60) DEFAULT NULL,
1017
  "End_Date" varchar(60) DEFAULT NULL,
1018
  "Contact_ID" integer DEFAULT NULL,
1019
  "Operator" varchar(30) DEFAULT NULL,
1020
  "Image_Main_ID" integer DEFAULT NULL,
1021
  "Image_Additional_ID" integer DEFAULT NULL,
1022
  "Notes" text,
1023
  "Last_Calibration_Date" varchar(60) DEFAULT NULL,
1024
  "Measure_Interval" varchar(120) DEFAULT NULL,
1025
  "Contact_Info" text,
1026
  "Temperature" integer DEFAULT NULL,
1027
  "Precipitation" integer DEFAULT NULL,
1028
  "Humidity" integer DEFAULT NULL,
1029
  "Wind" integer DEFAULT NULL,
1030
  "Atmospheric_Pressure" integer DEFAULT NULL,
1031
  "Solar_Radiation" integer DEFAULT NULL,
1032
  "PAR" integer DEFAULT NULL,
1033
  "Evapotranspiration" integer DEFAULT NULL,
1034
  "Soil_Moisture" integer DEFAULT NULL,
1035
  "Soil_Temperature" integer DEFAULT NULL,
1036
  "Water_Level" integer DEFAULT NULL,
1037
  "Temperature_Description" text,
1038
  "Precipitation_Description" text,
1039
  "Humidity_Description" text,
1040
  "Wind_Description" text,
1041
  "Atmospheric_Pressure_Description" text,
1042
  "Solar_Radiation_Description" text,
1043
  "PAR_Description" text,
1044
  "Evapotranspiration_Description" text,
1045
  "Soil_Moisture_Description" text,
1046
  "Soil_Temperature_Description" text,
1047
  "Water_Level_Description" text,
1048
  "station_managers" text,
1049
  PRIMARY KEY ("Station_ID"),
1050
  /*CONSTRAINT "XPKMeteo_Station" */UNIQUE ("Station_ID")
1051
);
1052
/*!40101 SET character_set_client = @saved_cs_client */;
1053

    
1054
--
1055
-- Table structure for table "navigation_menu"
1056
--
1057

    
1058
DROP TABLE IF EXISTS "navigation_menu";
1059
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1060
/*!40101 SET character_set_client = utf8 */;
1061
CREATE TABLE "navigation_menu" (
1062
  "nav_id" integer NOT NULL,
1063
  "section" varchar(30) DEFAULT NULL,
1064
  "top_level_name" varchar(90) DEFAULT NULL,
1065
  "top_level_action" varchar(90) DEFAULT NULL,
1066
  "top_level_rank" integer DEFAULT NULL,
1067
  "second_level_name" varchar(90) DEFAULT NULL,
1068
  "second_level_action" varchar(90) DEFAULT NULL,
1069
  "second_level_rank" integer DEFAULT NULL,
1070
  "third_level_name" varchar(90) DEFAULT NULL,
1071
  "third_level_action" varchar(90) DEFAULT NULL,
1072
  "third_level_rank" char(3) DEFAULT NULL,
1073
  PRIMARY KEY ("nav_id")
1074
);
1075
/*!40101 SET character_set_client = @saved_cs_client */;
1076

    
1077
--
1078
-- Table structure for table "organization_members"
1079
--
1080

    
1081
DROP TABLE IF EXISTS "organization_members";
1082
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1083
/*!40101 SET character_set_client = utf8 */;
1084
CREATE TABLE "organization_members" (
1085
  "Organization_ID" integer NOT NULL,
1086
  "Function_Org" varchar(120) DEFAULT NULL,
1087
  "Notes" text,
1088
  "Contact_ID" integer NOT NULL DEFAULT '0',
1089
  PRIMARY KEY ("Organization_ID"),
1090
  /*CONSTRAINT "XPKOrganization_Members" */UNIQUE ("Organization_ID","Contact_ID")
1091
);
1092
/*!40101 SET character_set_client = @saved_cs_client */;
1093

    
1094
--
1095
-- Table structure for table "project"
1096
--
1097

    
1098
DROP TABLE IF EXISTS "project";
1099
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1100
/*!40101 SET character_set_client = utf8 */;
1101
CREATE TABLE "project" (
1102
  "Project_ID" integer NOT NULL,
1103
  "Project_Name" varchar(60) DEFAULT NULL,
1104
  "Project_Description" text,
1105
  PRIMARY KEY ("Project_ID")
1106
);
1107
/*!40101 SET character_set_client = @saved_cs_client */;
1108

    
1109
--
1110
-- Table structure for table "reference"
1111
--
1112

    
1113
DROP TABLE IF EXISTS "reference";
1114
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1115
/*!40101 SET character_set_client = utf8 */;
1116
CREATE TABLE "reference" (
1117
  "reference_id" integer NOT NULL,
1118
  "Title" varchar(100) DEFAULT NULL,
1119
  "Description" text,
1120
  "biblio_id" integer DEFAULT NULL,
1121
  "Scheme" varchar(30) DEFAULT NULL,
1122
  "URL" text,
1123
  "Taxon_Type" varchar(30) DEFAULT NULL,
1124
  "taxon_id" integer DEFAULT NULL,
1125
  "old_Taxon_ID" integer DEFAULT NULL,
1126
  "Added_By_Signon" varchar(30) DEFAULT NULL,
1127
  "Added_Date" varchar(60) DEFAULT NULL,
1128
  "Updated_By_Signon" varchar(30) DEFAULT NULL,
1129
  "Updated_Date" varchar(60) DEFAULT NULL,
1130
  PRIMARY KEY ("reference_id"),
1131
  /*KEY "taxon_id" ("taxon_id")*/CHECK (true),
1132
  /*KEY "biblio_id" ("biblio_id")*/CHECK (true)
1133
);
1134
/*!40101 SET character_set_client = @saved_cs_client */;
1135

    
1136
--
1137
-- Table structure for table "region"
1138
--
1139

    
1140
DROP TABLE IF EXISTS "region";
1141
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1142
/*!40101 SET character_set_client = utf8 */;
1143
CREATE TABLE "region" (
1144
  "Region_ID" integer NOT NULL,
1145
  "Region_Name" varchar(60) NOT NULL DEFAULT '',
1146
  "Continent_ID" integer DEFAULT NULL,
1147
  "Country_ID" integer DEFAULT NULL,
1148
  PRIMARY KEY ("Region_ID")
1149
);
1150
/*!40101 SET character_set_client = @saved_cs_client */;
1151

    
1152
--
1153
-- Table structure for table "research_site"
1154
--
1155

    
1156
DROP TABLE IF EXISTS "research_site";
1157
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1158
/*!40101 SET character_set_client = utf8 */;
1159
CREATE TABLE "research_site" (
1160
  "Research_Site_ID" integer NOT NULL,
1161
  "Research_Site_Description" text,
1162
  "Research_Site_Name" varchar(60) DEFAULT NULL,
1163
  PRIMARY KEY ("Research_Site_ID")
1164
);
1165
/*!40101 SET character_set_client = @saved_cs_client */;
1166

    
1167
--
1168
-- Table structure for table "specimen"
1169
--
1170

    
1171
DROP TABLE IF EXISTS "specimen";
1172
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1173
/*!40101 SET character_set_client = utf8 */;
1174
CREATE TABLE "specimen" (
1175
  "Specimen_ID" integer NOT NULL,
1176
  "LSID_Object_ID" varchar(15) DEFAULT NULL,
1177
  "LSID_Authority_ID" integer DEFAULT NULL,
1178
  "LSID_Namespace_ID" integer DEFAULT NULL,
1179
  "Collection_LSID_Object_ID" varchar(15) DEFAULT NULL,
1180
  "Specimen_Number" integer DEFAULT NULL,
1181
  "Specimen_Version" integer DEFAULT NULL,
1182
  "Published_Specimen" integer DEFAULT NULL,
1183
  "Accession_Location_ID" integer DEFAULT NULL,
1184
  "Accession_Number" varchar(60) DEFAULT NULL,
1185
  "Auxiliary_Collections" varchar(60) DEFAULT NULL,
1186
  "Type_Specimen" varchar(60) DEFAULT NULL,
1187
  "Phenology_Stage" text,
1188
  "Collection_Method" text,
1189
  "ID_Notes" varchar(100) DEFAULT NULL,
1190
  "Specimen_Rep_Image" varchar(60) DEFAULT NULL,
1191
  "Specimen_Exists" integer DEFAULT '1',
1192
  "Institution_ID" integer DEFAULT NULL,
1193
  "Added_By_Signon" varchar(30) DEFAULT NULL,
1194
  "Added_Date" varchar(60) DEFAULT NULL,
1195
  PRIMARY KEY ("Specimen_ID"),
1196
  /*KEY "XPKSpecimen" ("Specimen_ID")*/CHECK (true),
1197
  /*KEY "Collection_LSID" ("Collection_LSID_Object_ID")*/CHECK (true)
1198
);
1199
/*!40101 SET character_set_client = @saved_cs_client */;
1200

    
1201
--
1202
-- Table structure for table "specimen_flat"
1203
--
1204

    
1205
DROP TABLE IF EXISTS "specimen_flat";
1206
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1207
/*!40101 SET character_set_client = utf8 */;
1208
CREATE TABLE "specimen_flat" (
1209
  "specimen_id" integer NOT NULL DEFAULT '0',
1210
  "Institution_Code" varchar(4) NOT NULL DEFAULT '',
1211
  "Global_Unique_Identifier" bytea DEFAULT NULL,
1212
  "Collector_Abbrev_Name" varchar(60) DEFAULT NULL,
1213
  "Collection_Team" varchar(120) DEFAULT NULL,
1214
  "Collection_Number" varchar(20) DEFAULT NULL,
1215
  "Date_of_Collection" varchar(60) DEFAULT NULL,
1216
  "Year_Collected" integer DEFAULT NULL,
1217
  "Month_Collected" integer DEFAULT NULL,
1218
  "Day_Collected" integer DEFAULT NULL,
1219
  "Catalog_Number" varchar(81) DEFAULT NULL,
1220
  "Scientific_Name" varchar(255) DEFAULT NULL,
1221
  "Kingdom_Name" varchar(60) DEFAULT NULL,
1222
  "Division_Name" varchar(60) DEFAULT NULL,
1223
  "Class_Name" varchar(60) DEFAULT NULL,
1224
  "Subclass_Name" varchar(60) DEFAULT NULL,
1225
  "Order_Name" varchar(60) DEFAULT NULL,
1226
  "Family_Name" varchar(60) DEFAULT NULL,
1227
  "Genus_Name" varchar(60) DEFAULT NULL,
1228
  "Specific_Epithet" varchar(60) DEFAULT NULL,
1229
  "Sp_Authority" varchar(255) DEFAULT NULL,
1230
  "Infra_Rank" varchar(100) DEFAULT NULL,
1231
  "Infra_Epithet" varchar(60) DEFAULT NULL,
1232
  "Local_Name" varchar(60) DEFAULT NULL,
1233
  "Continent_Name" varchar(60) DEFAULT NULL,
1234
  "Country_Name" varchar(60) DEFAULT '',
1235
  "Region_Name" varchar(60) DEFAULT '',
1236
  "Subregion_Name" varchar(60) DEFAULT NULL,
1237
  "Closest_Town" varchar(60) DEFAULT NULL,
1238
  "Research_Site_Name" varchar(60) DEFAULT NULL,
1239
  "Project_Name" varchar(60) DEFAULT NULL,
1240
  "Locality_Summary" varchar(60) DEFAULT NULL,
1241
  "Locality_Description" text,
1242
  "Locality_Site_Specific" varchar(120) DEFAULT NULL,
1243
  "Habitat_Description" text,
1244
  "Habitat_Summary" varchar(200) DEFAULT NULL,
1245
  "Soil_Description" text,
1246
  "Notes_Plant" text,
1247
  "Phenology_Stage" char NOT NULL DEFAULT '',
1248
  "Height_Min" float DEFAULT NULL,
1249
  "Height_Max" float DEFAULT NULL,
1250
  "DBH_Min" float DEFAULT NULL,
1251
  "DBH_Max" float DEFAULT NULL,
1252
  "Latitude" float DEFAULT NULL,
1253
  "Longitude" float DEFAULT NULL,
1254
  "Coordinate_Uncertainity" varchar(60) DEFAULT NULL,
1255
  "Elevation_Min" float DEFAULT NULL,
1256
  "Elevation_Max" float DEFAULT NULL,
1257
  "Basis_Of_Specimen" varchar(1) NOT NULL DEFAULT '',
1258
  "Auxilirary_Collections" char NOT NULL DEFAULT '',
1259
  "Collection_Method" varchar(5) NOT NULL DEFAULT '',
1260
  "Dubpliate_Herbarium" char NOT NULL DEFAULT '',
1261
  "Duplicates" bigint DEFAULT NULL,
1262
  "Type_Specimen" char NOT NULL DEFAULT '',
1263
  "Updated_date" varchar(60) DEFAULT NULL,
1264
  "Determined_By_Name" varchar(200) DEFAULT NULL,
1265
  "Determined_By_Date" varchar(30) DEFAULT NULL,
1266
  "Year_Identified" integer DEFAULT NULL,
1267
  "Month_Identified" integer DEFAULT NULL,
1268
  "Day_Identified" integer DEFAULT NULL
1269
);
1270
/*!40101 SET character_set_client = @saved_cs_client */;
1271

    
1272
--
1273
-- Table structure for table "subregion"
1274
--
1275

    
1276
DROP TABLE IF EXISTS "subregion";
1277
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1278
/*!40101 SET character_set_client = utf8 */;
1279
CREATE TABLE "subregion" (
1280
  "Region_ID" integer NOT NULL DEFAULT '0',
1281
  "Subregion_ID" integer NOT NULL,
1282
  "Subregion_Name" varchar(60) DEFAULT NULL,
1283
  PRIMARY KEY ("Subregion_ID")
1284
);
1285
/*!40101 SET character_set_client = @saved_cs_client */;
1286

    
1287
--
1288
-- Table structure for table "sync_resolution"
1289
--
1290

    
1291
DROP TABLE IF EXISTS "sync_resolution";
1292
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1293
/*!40101 SET character_set_client = utf8 */;
1294
CREATE TABLE "sync_resolution" (
1295
  "sync_resolution_id" integer NOT NULL,
1296
  "source" varchar(100) DEFAULT NULL,
1297
  "table_name" varchar(50) DEFAULT NULL,
1298
  "sync_lsid_full" varchar(150) DEFAULT NULL,
1299
  "sync_lsid_version" integer DEFAULT NULL,
1300
  "previous_lsid_full" varchar(150) DEFAULT NULL,
1301
  "previous_lsid_version" integer DEFAULT NULL,
1302
  "resolved_lsid_full" varchar(150) DEFAULT NULL,
1303
  "resolved_lsid_version" integer DEFAULT NULL,
1304
  "conflicted" integer DEFAULT NULL,
1305
  "resolved" integer DEFAULT NULL,
1306
  "conflict_manager_id" integer DEFAULT NULL,
1307
  "conflict_description" text,
1308
  "uploaded_by_signon" varchar(30) DEFAULT NULL,
1309
  "uploaded_date" varchar(60) DEFAULT NULL,
1310
  "updated_by_signon" varchar(30) DEFAULT NULL,
1311
  "updated_date" varchar(60) DEFAULT NULL,
1312
  "resolved_by_signon" varchar(30) DEFAULT NULL,
1313
  "resolved_date" varchar(60) DEFAULT NULL,
1314
  "notes" text,
1315
  PRIMARY KEY ("sync_resolution_id")
1316
);
1317
/*!40101 SET character_set_client = @saved_cs_client */;
1318

    
1319
--
1320
-- Table structure for table "taxon"
1321
--
1322

    
1323
DROP TABLE IF EXISTS "taxon";
1324
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1325
/*!40101 SET character_set_client = utf8 */;
1326
CREATE TABLE "taxon" (
1327
  "taxon_id" integer NOT NULL,
1328
  "taxon_name" varchar(60) DEFAULT NULL,
1329
  "taxon_rank_id" integer DEFAULT NULL,
1330
  "taxon_path" varchar(112) DEFAULT NULL,
1331
  "taxon_original_id" integer DEFAULT NULL,
1332
  "parent_id" integer DEFAULT NULL,
1333
  "kingdom_id" integer DEFAULT NULL,
1334
  "status" integer DEFAULT NULL,
1335
  "unaccept_reason_id" integer DEFAULT NULL,
1336
  "credibility_rating" varchar(40) DEFAULT NULL,
1337
  "taxon_authority" varchar(50) DEFAULT NULL,
1338
  "taxon_lsid" varchar(50) DEFAULT NULL,
1339
  "verified_date" timestamp DEFAULT NULL,
1340
  "added_date" timestamp DEFAULT NULL,
1341
  "added_by_signon" varchar(30) DEFAULT NULL,
1342
  "updated_date" timestamp DEFAULT NULL,
1343
  "updated_by_signon" varchar(30) DEFAULT NULL,
1344
  "author" varchar(255) DEFAULT NULL,
1345
  "old_id" integer DEFAULT NULL,
1346
  PRIMARY KEY ("taxon_id"),
1347
  /*CONSTRAINT "taxon_original_id" */UNIQUE ("taxon_original_id"),
1348
  /*KEY "taxon_rank_id" ("taxon_rank_id")*/CHECK (true),
1349
  /*KEY "taxon_path" ("taxon_path")*/CHECK (true),
1350
  /*KEY "taxon_name" ("taxon_name")*/CHECK (true),
1351
  /*KEY "parent_id" ("parent_id")*/CHECK (true),
1352
  /*KEY "kingdom_id" ("kingdom_id")*/CHECK (true)
1353
);
1354
/*!40101 SET character_set_client = @saved_cs_client */;
1355

    
1356
--
1357
-- Table structure for table "taxon_common_name"
1358
--
1359

    
1360
DROP TABLE IF EXISTS "taxon_common_name";
1361
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1362
/*!40101 SET character_set_client = utf8 */;
1363
CREATE TABLE "taxon_common_name" (
1364
  "taxon_common_name_id" integer NOT NULL,
1365
  "taxon_id" integer DEFAULT NULL,
1366
  "language_id" integer DEFAULT NULL,
1367
  "common_name" varchar(100) DEFAULT NULL,
1368
  "notes" text,
1369
  "added_date" timestamp DEFAULT NULL,
1370
  "added_by_signon" varchar(60) DEFAULT NULL,
1371
  "updated_date" timestamp DEFAULT NULL,
1372
  "updated_by_signon" varchar(60) DEFAULT NULL,
1373
  PRIMARY KEY ("taxon_common_name_id"),
1374
  /*CONSTRAINT "XPKLocal_Names" */UNIQUE ("taxon_common_name_id")
1375
);
1376
/*!40101 SET character_set_client = @saved_cs_client */;
1377

    
1378
--
1379
-- Table structure for table "taxon_common_name_country"
1380
--
1381

    
1382
DROP TABLE IF EXISTS "taxon_common_name_country";
1383
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1384
/*!40101 SET character_set_client = utf8 */;
1385
CREATE TABLE "taxon_common_name_country" (
1386
  "taxon_common_name_id" integer DEFAULT NULL,
1387
  "country_id" integer DEFAULT NULL
1388
);
1389
/*!40101 SET character_set_client = @saved_cs_client */;
1390

    
1391
--
1392
-- Table structure for table "taxon_flat"
1393
--
1394

    
1395
DROP TABLE IF EXISTS "taxon_flat";
1396
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1397
/*!40101 SET character_set_client = utf8 */;
1398
CREATE TABLE "taxon_flat" (
1399
  "taxon_id" integer NOT NULL DEFAULT '0',
1400
  "taxon_rank_id" integer DEFAULT NULL,
1401
  "Kingdom_name" varchar(60) DEFAULT NULL,
1402
  "Kingdom_id" bigint DEFAULT NULL,
1403
  "Subkingdom_name" varchar(60) DEFAULT NULL,
1404
  "Subkingdom_id" bigint DEFAULT NULL,
1405
  "Division_name" varchar(60) DEFAULT NULL,
1406
  "Division_id" bigint DEFAULT NULL,
1407
  "Subdivision_name" varchar(60) DEFAULT NULL,
1408
  "Subdivision_id" bigint DEFAULT NULL,
1409
  "Class_name" varchar(60) DEFAULT NULL,
1410
  "Class_id" bigint DEFAULT NULL,
1411
  "Subclass_name" varchar(60) DEFAULT NULL,
1412
  "Subclass_id" bigint DEFAULT NULL,
1413
  "Order_name" varchar(60) DEFAULT NULL,
1414
  "Order_id" bigint DEFAULT NULL,
1415
  "Suborder_name" varchar(60) DEFAULT NULL,
1416
  "Suborder_id" bigint DEFAULT NULL,
1417
  "Family_name" varchar(60) DEFAULT NULL,
1418
  "Family_id" bigint DEFAULT NULL,
1419
  "Subfamily_name" varchar(60) DEFAULT NULL,
1420
  "Subfamily_id" bigint DEFAULT NULL,
1421
  "Tribe_name" varchar(60) DEFAULT NULL,
1422
  "Tribe_id" bigint DEFAULT NULL,
1423
  "Subtribe_name" varchar(60) DEFAULT NULL,
1424
  "Subtribe_id" bigint DEFAULT NULL,
1425
  "Genus_name" varchar(60) DEFAULT NULL,
1426
  "Genus_id" bigint DEFAULT NULL,
1427
  "Subgenus_name" varchar(60) DEFAULT NULL,
1428
  "Subgenus_id" bigint DEFAULT NULL,
1429
  "Section_name" varchar(60) DEFAULT NULL,
1430
  "Section_id" bigint DEFAULT NULL,
1431
  "Subsection_name" varchar(60) DEFAULT NULL,
1432
  "Subsection_id" bigint DEFAULT NULL,
1433
  "Species_name" varchar(60) DEFAULT NULL,
1434
  "Species_id" bigint DEFAULT NULL,
1435
  "Subspecies_name" varchar(60) DEFAULT NULL,
1436
  "Subspecies_id" bigint DEFAULT NULL,
1437
  "Variety_name" varchar(60) DEFAULT NULL,
1438
  "Variety_id" bigint DEFAULT NULL,
1439
  "Subvariety_name" varchar(60) DEFAULT NULL,
1440
  "Subvariety_id" bigint DEFAULT NULL,
1441
  "Form_name" varchar(60) DEFAULT NULL,
1442
  "Form_id" bigint DEFAULT NULL,
1443
  "Subform_name" varchar(60) DEFAULT NULL,
1444
  "Subform_id" bigint DEFAULT NULL,
1445
  /*KEY "taxon_id" ("taxon_id")*/CHECK (true),
1446
  /*KEY "taxon_rank_id" ("taxon_rank_id")*/CHECK (true)
1447
);
1448
/*!40101 SET character_set_client = @saved_cs_client */;
1449

    
1450
--
1451
-- Table structure for table "taxon_kingdom"
1452
--
1453

    
1454
DROP TABLE IF EXISTS "taxon_kingdom";
1455
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1456
/*!40101 SET character_set_client = utf8 */;
1457
CREATE TABLE "taxon_kingdom" (
1458
  "taxon_kingdom_id" integer NOT NULL,
1459
  "kingdom_name" varchar(60) DEFAULT NULL,
1460
  PRIMARY KEY ("taxon_kingdom_id"),
1461
  /*CONSTRAINT "XPKKingdom" */UNIQUE ("taxon_kingdom_id")
1462
);
1463
/*!40101 SET character_set_client = @saved_cs_client */;
1464

    
1465
--
1466
-- Table structure for table "taxon_literature"
1467
--
1468

    
1469
DROP TABLE IF EXISTS "taxon_literature";
1470
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1471
/*!40101 SET character_set_client = utf8 */;
1472
CREATE TABLE "taxon_literature" (
1473
  "taxon_id" integer DEFAULT NULL,
1474
  "literature_id" integer DEFAULT NULL
1475
);
1476
/*!40101 SET character_set_client = @saved_cs_client */;
1477

    
1478
--
1479
-- Table structure for table "taxon_rank"
1480
--
1481

    
1482
DROP TABLE IF EXISTS "taxon_rank";
1483
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1484
/*!40101 SET character_set_client = utf8 */;
1485
CREATE TABLE "taxon_rank" (
1486
  "taxon_rank_id" integer NOT NULL,
1487
  "rank" varchar(60) DEFAULT NULL,
1488
  "kingdom_id" integer DEFAULT NULL,
1489
  "direct_parent_rank_id" integer DEFAULT NULL,
1490
  "required_parent_rank_id" integer DEFAULT NULL,
1491
  "standard_rank" integer DEFAULT NULL,
1492
  "itis_rank_id" integer DEFAULT NULL,
1493
  PRIMARY KEY ("taxon_rank_id"),
1494
  /*KEY "type" ("rank")*/CHECK (true)
1495
);
1496
/*!40101 SET character_set_client = @saved_cs_client */;
1497

    
1498
--
1499
-- Table structure for table "taxon_rep_image"
1500
--
1501

    
1502
DROP TABLE IF EXISTS "taxon_rep_image";
1503
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1504
/*!40101 SET character_set_client = utf8 */;
1505
CREATE TABLE "taxon_rep_image" (
1506
  "taxon_id" integer DEFAULT NULL,
1507
  "image_id" integer DEFAULT NULL
1508
);
1509
/*!40101 SET character_set_client = @saved_cs_client */;
1510

    
1511
--
1512
-- Table structure for table "taxon_synonym"
1513
--
1514

    
1515
DROP TABLE IF EXISTS "taxon_synonym";
1516
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1517
/*!40101 SET character_set_client = utf8 */;
1518
CREATE TABLE "taxon_synonym" (
1519
  "taxon_id" integer DEFAULT NULL,
1520
  "accepted_taxon_id" integer DEFAULT NULL,
1521
  "added_date" timestamp DEFAULT NULL,
1522
  "added_by_signon" varchar(30) DEFAULT NULL,
1523
  "updated_date" timestamp DEFAULT NULL,
1524
  "updated_by_signon" varchar(30) DEFAULT NULL
1525
);
1526
/*!40101 SET character_set_client = @saved_cs_client */;
1527

    
1528
--
1529
-- Table structure for table "taxon_unaccept_reason"
1530
--
1531

    
1532
DROP TABLE IF EXISTS "taxon_unaccept_reason";
1533
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1534
/*!40101 SET character_set_client = utf8 */;
1535
CREATE TABLE "taxon_unaccept_reason" (
1536
  "taxon_unaccept_reason_id" integer NOT NULL,
1537
  "unaccept_reason" varchar(50) DEFAULT NULL,
1538
  "kingdom_id" integer DEFAULT NULL,
1539
  PRIMARY KEY ("taxon_unaccept_reason_id")
1540
);
1541
/*!40101 SET character_set_client = @saved_cs_client */;
1542

    
1543
--
1544
-- Table structure for table "upload_status"
1545
--
1546

    
1547
DROP TABLE IF EXISTS "upload_status";
1548
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1549
/*!40101 SET character_set_client = utf8 */;
1550
CREATE TABLE "upload_status" (
1551
  "upload_id" char(36) DEFAULT NULL,
1552
  "filename" varchar(150) DEFAULT NULL,
1553
  "records_processed" integer DEFAULT NULL,
1554
  "status" varchar(50) DEFAULT NULL,
1555
  "start_time" timestamp DEFAULT NULL,
1556
  "last_update_time" timestamp DEFAULT NULL,
1557
  "complete_time" timestamp DEFAULT NULL
1558
);
1559
/*!40101 SET character_set_client = @saved_cs_client */;
1560

    
1561
--
1562
-- Table structure for table "veg_indv"
1563
--
1564

    
1565
DROP TABLE IF EXISTS "veg_indv";
1566
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1567
/*!40101 SET character_set_client = utf8 */;
1568
CREATE TABLE "veg_indv" (
1569
  "veg_indv_id" integer NOT NULL,
1570
  "veg_subunit_id" integer DEFAULT NULL,
1571
  "Rep_Collection_LSID_Object_ID" varchar(15) DEFAULT NULL,
1572
  "Collection_LSID_Object_ID" varchar(15) DEFAULT NULL,
1573
  "tag_nbr" varchar(10) DEFAULT NULL,
1574
  "x" float DEFAULT NULL,
1575
  "y" float DEFAULT NULL,
1576
  "distance" float DEFAULT NULL,
1577
  /*CONSTRAINT "veg_indv_id" */UNIQUE ("veg_indv_id"),
1578
  /*KEY "veg_subunit_id" ("veg_subunit_id")*/CHECK (true),
1579
  /*KEY "collection_lsid" ("Collection_LSID_Object_ID")*/CHECK (true),
1580
  /*KEY "rep_collection_lsid_num" ("Rep_Collection_LSID_Object_ID")*/CHECK (true)
1581
);
1582
/*!40101 SET character_set_client = @saved_cs_client */;
1583

    
1584
--
1585
-- Table structure for table "veg_indv_measurement"
1586
--
1587

    
1588
DROP TABLE IF EXISTS "veg_indv_measurement";
1589
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1590
/*!40101 SET character_set_client = utf8 */;
1591
CREATE TABLE "veg_indv_measurement" (
1592
  "veg_indv_measurement_id" integer NOT NULL,
1593
  "veg_survey_id" integer DEFAULT NULL,
1594
  "veg_indv_id" integer DEFAULT NULL,
1595
  "dbh1" float DEFAULT NULL,
1596
  "pom1" float DEFAULT NULL,
1597
  "dbh2" float DEFAULT NULL,
1598
  "pom2" float DEFAULT NULL,
1599
  "bole_form" varchar(20) DEFAULT NULL,
1600
  "height" float DEFAULT NULL,
1601
  "crown_n" float DEFAULT NULL,
1602
  "crown_s" float DEFAULT NULL,
1603
  "crown_e" float DEFAULT NULL,
1604
  "crown_w" float DEFAULT NULL,
1605
  "crown_width" float DEFAULT NULL,
1606
  "alive" integer DEFAULT NULL,
1607
  "status" varchar(20) DEFAULT NULL,
1608
  "obs_plant" text,
1609
  "obs_cond" text,
1610
  "data_notes" text,
1611
  /*CONSTRAINT "veg_indv_measurement_id" */UNIQUE ("veg_indv_measurement_id"),
1612
  /*KEY "veg_survey_id" ("veg_survey_id")*/CHECK (true),
1613
  /*KEY "veg_indv_id" ("veg_indv_id")*/CHECK (true)
1614
);
1615
/*!40101 SET character_set_client = @saved_cs_client */;
1616

    
1617
--
1618
-- Table structure for table "veg_literature"
1619
--
1620

    
1621
DROP TABLE IF EXISTS "veg_literature";
1622
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1623
/*!40101 SET character_set_client = utf8 */;
1624
CREATE TABLE "veg_literature" (
1625
  "veg_literature_id" integer NOT NULL,
1626
  "literature_id" integer DEFAULT NULL,
1627
  "tansect_unit_id" integer DEFAULT NULL,
1628
  "veg_id" integer DEFAULT NULL,
1629
  PRIMARY KEY ("veg_literature_id")
1630
);
1631
/*!40101 SET character_set_client = @saved_cs_client */;
1632

    
1633
--
1634
-- Table structure for table "veg_soil"
1635
--
1636

    
1637
DROP TABLE IF EXISTS "veg_soil";
1638
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1639
/*!40101 SET character_set_client = utf8 */;
1640
CREATE TABLE "veg_soil" (
1641
  "veg_soil_id" integer NOT NULL,
1642
  "veg_unit_id" integer DEFAULT NULL,
1643
  "veg_subunit_id" integer DEFAULT NULL,
1644
  "measurement" text,
1645
  "pi" text,
1646
  "lab" text,
1647
  "date_collected" date DEFAULT NULL,
1648
  "date_analysed" date DEFAULT NULL,
1649
  "x" float DEFAULT NULL,
1650
  "y" float DEFAULT NULL,
1651
  "ph_h20" float DEFAULT NULL,
1652
  "ph_kcl" float DEFAULT NULL,
1653
  "sand" float DEFAULT NULL,
1654
  "silt" float DEFAULT NULL,
1655
  "clay" float DEFAULT NULL,
1656
  "org_matter" float DEFAULT NULL,
1657
  "loss_ign" float DEFAULT NULL,
1658
  "n" float DEFAULT NULL,
1659
  "p_bray" float DEFAULT NULL,
1660
  "p_tot" float DEFAULT NULL,
1661
  "k" float DEFAULT NULL,
1662
  "ca" float DEFAULT NULL,
1663
  "mg" float DEFAULT NULL,
1664
  "na" float DEFAULT NULL,
1665
  "b" float DEFAULT NULL,
1666
  "cd" float DEFAULT NULL,
1667
  "co" float DEFAULT NULL,
1668
  "cu" float DEFAULT NULL,
1669
  "fe" float DEFAULT NULL,
1670
  "mn" float DEFAULT NULL,
1671
  "mo" float DEFAULT NULL,
1672
  "si" float DEFAULT NULL,
1673
  "ti" float DEFAULT NULL,
1674
  "zn" float DEFAULT NULL,
1675
  "cic" float DEFAULT NULL,
1676
  "cai2" float DEFAULT NULL,
1677
  "mgi2" float DEFAULT NULL,
1678
  "ki" float DEFAULT NULL,
1679
  "nai" float DEFAULT NULL,
1680
  "ali3hi" float DEFAULT NULL,
1681
  "cat_tot" float DEFAULT NULL,
1682
  "ecec" float DEFAULT NULL,
1683
  "base_tot" float DEFAULT NULL,
1684
  /*CONSTRAINT "veg_soil_id" */UNIQUE ("veg_soil_id"),
1685
  /*KEY "veg_unit_id" ("veg_unit_id")*/CHECK (true),
1686
  /*KEY "veg_subunit_id" ("veg_subunit_id")*/CHECK (true)
1687
);
1688
/*!40101 SET character_set_client = @saved_cs_client */;
1689

    
1690
--
1691
-- Table structure for table "veg_subunit"
1692
--
1693

    
1694
DROP TABLE IF EXISTS "veg_subunit";
1695
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1696
/*!40101 SET character_set_client = utf8 */;
1697
CREATE TABLE "veg_subunit" (
1698
  "veg_subunit_id" integer NOT NULL,
1699
  "veg_unit_id" integer DEFAULT NULL,
1700
  "veg_subunit_code" varchar(15) DEFAULT NULL,
1701
  "latitude" float DEFAULT NULL,
1702
  "longitude" float DEFAULT NULL,
1703
  "bearing" float DEFAULT NULL,
1704
  "x" float DEFAULT NULL,
1705
  "y" float DEFAULT NULL,
1706
  /*CONSTRAINT "veg_subunit_id" */UNIQUE ("veg_subunit_id"),
1707
  /*KEY "veg_unit_id" ("veg_unit_id")*/CHECK (true)
1708
);
1709
/*!40101 SET character_set_client = @saved_cs_client */;
1710

    
1711
--
1712
-- Table structure for table "veg_survey"
1713
--
1714

    
1715
DROP TABLE IF EXISTS "veg_survey";
1716
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1717
/*!40101 SET character_set_client = utf8 */;
1718
CREATE TABLE "veg_survey" (
1719
  "veg_survey_id" integer NOT NULL,
1720
  "min_dbh" float DEFAULT NULL,
1721
  "method_notes" text,
1722
  "institution_id" integer DEFAULT NULL,
1723
  "project_id" integer DEFAULT NULL,
1724
  "principal_investigator" text,
1725
  "investigators" text,
1726
  "date_begin" date DEFAULT NULL,
1727
  "date_end" date DEFAULT NULL,
1728
  "notes" text,
1729
  "veg_unit_id" integer DEFAULT NULL,
1730
  /*CONSTRAINT "veg_survey_id" */UNIQUE ("veg_survey_id"),
1731
  /*KEY "institution_id" ("institution_id")*/CHECK (true),
1732
  /*KEY "project_id" ("project_id")*/CHECK (true),
1733
  /*KEY "veg_unit_id" ("veg_unit_id")*/CHECK (true)
1734
);
1735
/*!40101 SET character_set_client = @saved_cs_client */;
1736

    
1737
--
1738
-- Table structure for table "veg_unit"
1739
--
1740

    
1741
DROP TABLE IF EXISTS "veg_unit";
1742
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1743
/*!40101 SET character_set_client = utf8 */;
1744
CREATE TABLE "veg_unit" (
1745
  "veg_unit_id" integer NOT NULL,
1746
  "veg_unit_name" varchar(60) DEFAULT NULL,
1747
  "veg_unit_code" varchar(10) DEFAULT NULL,
1748
  "date_established" date DEFAULT NULL,
1749
  "description" text,
1750
  "location_notes" text,
1751
  "research_site_id" integer DEFAULT NULL,
1752
  "life_zone_id" integer DEFAULT NULL,
1753
  "topography" text,
1754
  "slope_aspect" float DEFAULT NULL,
1755
  "slope_gradient" float DEFAULT NULL,
1756
  "average_temp" float DEFAULT NULL,
1757
  "average_precipitation" float DEFAULT NULL,
1758
  "notes" text,
1759
  "institution_id" integer DEFAULT NULL,
1760
  "contact" text,
1761
  "permanent" integer DEFAULT NULL,
1762
  "size" float DEFAULT NULL,
1763
  "shape" varchar(60) DEFAULT NULL,
1764
  "latitude" float DEFAULT NULL,
1765
  "longitude" float DEFAULT NULL,
1766
  "elevation" float DEFAULT NULL,
1767
  "country_id" integer DEFAULT NULL,
1768
  "region_id" integer DEFAULT NULL,
1769
  "subregion_id" integer DEFAULT NULL,
1770
  "protected_area" varchar(60) DEFAULT NULL,
1771
  "soil_statement" text,
1772
  "habitat_statement" text,
1773
  "eco_id" integer DEFAULT NULL,
1774
  "vegetation_type" varchar(60) DEFAULT NULL,
1775
  "length" float DEFAULT NULL,
1776
  "width" float DEFAULT NULL,
1777
  "survey_type" varchar(60) DEFAULT NULL,
1778
  "history_statement" varchar(60) DEFAULT NULL,
1779
  "use_statement" text,
1780
  "orientation" float DEFAULT NULL,
1781
  "published" integer DEFAULT NULL,
1782
  "unit_managers" text,
1783
  "public_downloads" integer DEFAULT NULL,
1784
  "gis_ids" text,
1785
  /*CONSTRAINT "veg_unit_id" */UNIQUE ("veg_unit_id"),
1786
  /*KEY "institution_id" ("institution_id")*/CHECK (true),
1787
  /*KEY "country_id" ("country_id")*/CHECK (true),
1788
  /*KEY "region_id" ("region_id")*/CHECK (true),
1789
  /*KEY "subregion_id" ("subregion_id")*/CHECK (true),
1790
  /*KEY "life_zone_id" ("life_zone_id")*/CHECK (true),
1791
  /*KEY "research_site_id" ("research_site_id")*/CHECK (true)
1792
);
1793
/*!40101 SET character_set_client = @saved_cs_client */;
1794
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1795

    
1796
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1797
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1798
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1799
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1800
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1801
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1802
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1803

    
1804
-- Dump completed on 2013-02-28 14:55:24
(1-1/2)