Project

General

Profile

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

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

    
20
--
21
-- Table structure for table "agent"
22
--
23

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

    
49
--
50
-- Table structure for table "analysis_scripts"
51
--
52

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

    
67
--
68
-- Table structure for table "annotation_hist"
69
--
70

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

    
109
--
110
-- Table structure for table "authority"
111
--
112

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

    
126
--
127
-- Table structure for table "collection"
128
--
129

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

    
198
--
199
-- Table structure for table "collection_habit"
200
--
201

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

    
213
--
214
-- Table structure for table "collection_habitat"
215
--
216

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

    
228
--
229
-- Table structure for table "contact_persons"
230
--
231

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

    
267
--
268
-- Table structure for table "continent"
269
--
270

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

    
281
--
282
-- Table structure for table "country"
283
--
284

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

    
297
--
298
-- Table structure for table "custom_field_associations"
299
--
300

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

    
313
--
314
-- Table structure for table "custom_field_data"
315
--
316

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

    
332
--
333
-- Table structure for table "custom_field_definition"
334
--
335

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

    
357
--
358
-- Table structure for table "custom_field_group"
359
--
360

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

    
377
--
378
-- Table structure for table "custom_field_structure"
379
--
380

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

    
402
--
403
-- Table structure for table "custom_fields_datetime"
404
--
405

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

    
416
--
417
-- Table structure for table "custom_fields_float"
418
--
419

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

    
430
--
431
-- Table structure for table "custom_fields_integer"
432
--
433

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

    
444
--
445
-- Table structure for table "custom_fields_text"
446
--
447

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

    
458
--
459
-- Table structure for table "custom_fields_url"
460
--
461

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

    
472
--
473
-- Table structure for table "custom_fields_varchar"
474
--
475

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

    
486
--
487
-- Table structure for table "debug_output"
488
--
489

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

    
499
--
500
-- Table structure for table "ecoregion"
501
--
502

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

    
524
--
525
-- Table structure for table "glossary"
526
--
527

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

    
541
--
542
-- Table structure for table "habit"
543
--
544

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

    
556
--
557
-- Table structure for table "habitat"
558
--
559

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

    
571
--
572
-- Table structure for table "herbarium_contact"
573
--
574

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

    
587
--
588
-- Table structure for table "image_category"
589
--
590

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

    
603
--
604
-- Table structure for table "image_management"
605
--
606

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

    
622
--
623
-- Table structure for table "images"
624
--
625

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

    
671
--
672
-- Table structure for table "institution"
673
--
674

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

    
705
--
706
-- Table structure for table "languages"
707
--
708

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

    
719
--
720
-- Table structure for table "life_zone"
721
--
722

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

    
734
--
735
-- Table structure for table "literature"
736
--
737

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

    
782
--
783
-- Table structure for table "literature_contact"
784
--
785

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

    
796
--
797
-- Table structure for table "literature_family"
798
--
799

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

    
810
--
811
-- Table structure for table "local_names"
812
--
813

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

    
829
--
830
-- Table structure for table "localized_strings"
831
--
832

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

    
847
--
848
-- Table structure for table "lsid_authority"
849
--
850

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

    
862
--
863
-- Table structure for table "lsid_namespace"
864
--
865

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

    
877
--
878
-- Table structure for table "metadata"
879
--
880

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

    
924
--
925
-- Table structure for table "meteo_data"
926
--
927

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

    
956
--
957
-- Table structure for table "meteo_images"
958
--
959

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

    
973
--
974
-- Table structure for table "meteo_missing_data"
975
--
976

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

    
993
--
994
-- Table structure for table "meteo_station"
995
--
996

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

    
1052
--
1053
-- Table structure for table "navigation_menu"
1054
--
1055

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

    
1075
--
1076
-- Table structure for table "organization_members"
1077
--
1078

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

    
1092
--
1093
-- Table structure for table "project"
1094
--
1095

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

    
1107
--
1108
-- Table structure for table "reference"
1109
--
1110

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

    
1134
--
1135
-- Table structure for table "region"
1136
--
1137

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

    
1150
--
1151
-- Table structure for table "research_site"
1152
--
1153

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

    
1165
--
1166
-- Table structure for table "specimen"
1167
--
1168

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

    
1199
--
1200
-- Table structure for table "specimen_flat"
1201
--
1202

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

    
1270
--
1271
-- Table structure for table "subregion"
1272
--
1273

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

    
1285
--
1286
-- Table structure for table "sync_resolution"
1287
--
1288

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

    
1317
--
1318
-- Table structure for table "taxon"
1319
--
1320

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

    
1354
--
1355
-- Table structure for table "taxon_common_name"
1356
--
1357

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

    
1376
--
1377
-- Table structure for table "taxon_common_name_country"
1378
--
1379

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

    
1389
--
1390
-- Table structure for table "taxon_flat"
1391
--
1392

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

    
1448
--
1449
-- Table structure for table "taxon_kingdom"
1450
--
1451

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

    
1463
--
1464
-- Table structure for table "taxon_literature"
1465
--
1466

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

    
1476
--
1477
-- Table structure for table "taxon_rank"
1478
--
1479

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

    
1496
--
1497
-- Table structure for table "taxon_rep_image"
1498
--
1499

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

    
1509
--
1510
-- Table structure for table "taxon_synonym"
1511
--
1512

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

    
1526
--
1527
-- Table structure for table "taxon_unaccept_reason"
1528
--
1529

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

    
1541
--
1542
-- Table structure for table "upload_status"
1543
--
1544

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

    
1559
--
1560
-- Table structure for table "veg_indv"
1561
--
1562

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

    
1582
--
1583
-- Table structure for table "veg_indv_measurement"
1584
--
1585

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

    
1615
--
1616
-- Table structure for table "veg_literature"
1617
--
1618

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

    
1631
--
1632
-- Table structure for table "veg_soil"
1633
--
1634

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

    
1688
--
1689
-- Table structure for table "veg_subunit"
1690
--
1691

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

    
1709
--
1710
-- Table structure for table "veg_survey"
1711
--
1712

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

    
1735
--
1736
-- Table structure for table "veg_unit"
1737
--
1738

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

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

    
1802
-- Dump completed on 2013-02-28 14:55:24
(2-2/5)