Project

General

Profile

« Previous | Next » 

Revision 11678

added inputs/CVS/_src/cvs-eep-archive-2013-10-22-VegBIEN.schema.sql

View differences:

inputs/CVS/_src/cvs-eep-archive-2013-10-22-VegBIEN.schema.sql
1
-- Dump File
2
--
3
-- Database is ported from MS Access
4
----------------------------------------------------------
5
-- Program Version 3.0.148
6

  
7
CREATE DATABASE "cvs-eep-archive-2013-10-22-VegBIEN";
8

  
9
-- NOTICE: At this place you need to connect to the new database and run the rest of the statements.
10

  
11
--
12
-- Table structure for table 'accessionCodeCorrelation'
13
--
14

  
15
DROP TABLE IF EXISTS "accessionCodeCorrelation";
16

  
17
CREATE TABLE "accessionCodeCorrelation" (
18
  "accessionCodeCorrelation_ID" SERIAL NOT NULL, 
19
  "oldAccessionCode" VARCHAR(255) NOT NULL, 
20
  "preferredAccessionCode" VARCHAR(255) NOT NULL, 
21
  "accessionCodeTable" VARCHAR(255), 
22
  "accessionCodeRelationship" VARCHAR(255) NOT NULL, 
23
  PRIMARY KEY ("accessionCodeCorrelation_ID")
24
);
25

  
26
--
27
-- Table structure for table 'address'
28
--
29

  
30
DROP TABLE IF EXISTS "address";
31

  
32
CREATE TABLE "address" (
33
  "ADDRESS_ID" SERIAL NOT NULL, 
34
  "party_ID" INTEGER NOT NULL, 
35
  "organization_ID" INTEGER, 
36
  "orgPosition" VARCHAR(50), 
37
  "email" VARCHAR(100), 
38
  "deliveryPoint" VARCHAR(200), 
39
  "city" VARCHAR(50), 
40
  "administrativeArea" VARCHAR(50), 
41
  "postalCode" VARCHAR(10), 
42
  "country" VARCHAR(50), 
43
  "currentFlag" /*BOOLEAN*/INTEGER DEFAULT E'0', 
44
  "addressStartDate" TIMESTAMP, 
45
  "dba_src_ID" INTEGER, 
46
  PRIMARY KEY ("ADDRESS_ID")
47
);
48

  
49
--
50
-- Table structure for table 'archiveLog'
51
--
52

  
53
DROP TABLE IF EXISTS "archiveLog";
54

  
55
CREATE TABLE "archiveLog" (
56
  "archiveLog_ID" SERIAL NOT NULL, 
57
  "archiveLogUser" VARCHAR(50), 
58
  "archiveLogComment" TEXT, 
59
  "commentDate" TIMESTAMP DEFAULT E'=Now()', 
60
  PRIMARY KEY ("archiveLog_ID")
61
);
62

  
63
--
64
-- Table structure for table 'aux_Role'
65
--
66

  
67
DROP TABLE IF EXISTS "aux_Role";
68

  
69
CREATE TABLE "aux_Role" (
70
  "ROLE_ID" SERIAL NOT NULL, 
71
  "roleCode" VARCHAR(30) NOT NULL, 
72
  "roleDescription" VARCHAR(200), 
73
  "accessionCode" VARCHAR(100), 
74
  "roleProject" INTEGER, 
75
  "roleObservation" INTEGER, 
76
  "roleTaxonInt" INTEGER, 
77
  "roleClassInt" INTEGER, 
78
  "dba_src_ID" INTEGER, 
79
  PRIMARY KEY ("ROLE_ID")
80
);
81

  
82
--
83
-- Table structure for table 'classContributor'
84
--
85

  
86
DROP TABLE IF EXISTS "classContributor";
87

  
88
CREATE TABLE "classContributor" (
89
  "CLASSCONTRIBUTOR_ID" SERIAL NOT NULL, 
90
  "COMMCLASS_ID" INTEGER NOT NULL, 
91
  "PARTY_ID" INTEGER NOT NULL, 
92
  "ROLE_ID" INTEGER, 
93
  "dba_src_ID" INTEGER, 
94
  PRIMARY KEY ("CLASSCONTRIBUTOR_ID")
95
);
96

  
97
--
98
-- Table structure for table 'commClass'
99
--
100

  
101
DROP TABLE IF EXISTS "commClass";
102

  
103
CREATE TABLE "commClass" (
104
  "COMMCLASS_ID" SERIAL NOT NULL, 
105
  "OBSERVATION_ID" INTEGER NOT NULL, 
106
  "classStartDate" TIMESTAMP, 
107
  "classStopDate" TIMESTAMP, 
108
  "inspection" /*BOOLEAN*/INTEGER DEFAULT E'0', 
109
  "tableAnalysis" /*BOOLEAN*/INTEGER DEFAULT E'0', 
110
  "multivariateAnalysis" /*BOOLEAN*/INTEGER DEFAULT E'0', 
111
  "expertSystem" TEXT, 
112
  "classPublication_ID" INTEGER, 
113
  "classNotes" TEXT, 
114
  "commName" VARCHAR(200), 
115
  "commCode" VARCHAR(200), 
116
  "commFramework" VARCHAR(200), 
117
  "commLevel" VARCHAR(200), 
118
  "accessionCode" VARCHAR(100), 
119
  "dba_src_ID" INTEGER, 
120
  "dba_dataSource" VARCHAR(255), 
121
  "classStopReason" VARCHAR(255), 
122
  PRIMARY KEY ("COMMCLASS_ID")
123
);
124

  
125
--
126
-- Table structure for table 'commConcept'
127
--
128

  
129
DROP TABLE IF EXISTS "commConcept";
130

  
131
CREATE TABLE "commConcept" (
132
  "COMMCONCEPT_ID" SERIAL NOT NULL, 
133
  "COMMNAME_ID" INTEGER NOT NULL, 
134
  "reference_ID" INTEGER, 
135
  "commDescription" TEXT, 
136
  "accessionCode" VARCHAR(100), 
137
  "dba_src_ID" INTEGER, 
138
  "commName" VARCHAR(255), 
139
  "referenceText" VARCHAR(255), 
140
  "scientific" VARCHAR(255), 
141
  "translated" VARCHAR(255), 
142
  "code" VARCHAR(255), 
143
  "originalAuthorCode" VARCHAR(255), 
144
  "common" VARCHAR(255), 
145
  "commLevel" VARCHAR(80), 
146
  "alliance" VARCHAR(255), 
147
  "includeInPicklistNow" /*BOOLEAN*/INTEGER DEFAULT E'-1', 
148
  "PhysGroup" VARCHAR(255), 
149
  "FormGroup" VARCHAR(255), 
150
  "EcolGroup" VARCHAR(255), 
151
  "4thApproxName" VARCHAR(255), 
152
  "NatureServeUID" VARCHAR(255), 
153
  "classificationSystem" VARCHAR(255), 
154
  PRIMARY KEY ("COMMCONCEPT_ID"), 
155
  UNIQUE ("classificationSystem", "code")
156
);
157

  
158
--
159
-- Table structure for table 'commConceptCVSHierarchy'
160
--
161

  
162
DROP TABLE IF EXISTS "commConceptCVSHierarchy";
163

  
164
CREATE TABLE "commConceptCVSHierarchy" (
165
  "commConceptHierarchy_ID" SERIAL NOT NULL, 
166
  "COMMCONCEPT_ID" INTEGER, 
167
  "commCode" VARCHAR(255), 
168
  "commSci" TEXT, 
169
  "commTransl" TEXT, 
170
  "commCommonName" TEXT, 
171
  "4thApprox" TEXT, 
172
  "cvslink" TEXT, 
173
  "nsLink" TEXT, 
174
  "vegBankLink" TEXT, 
175
  "cvsprovince" VARCHAR(50), 
176
  "phys" VARCHAR(255), 
177
  "form" VARCHAR(255), 
178
  "ecol" VARCHAR(255), 
179
  "file" VARCHAR(50), 
180
  "dateUpdated" TIMESTAMP DEFAULT E'=Now()', 
181
  "hierarchySystem" VARCHAR(255), 
182
  "commOrder" DOUBLE PRECISION NULL, 
183
  "LevelCommDescription" TEXT, 
184
  "keyToChildren" TEXT, 
185
  "deleted" /*BOOLEAN*/INTEGER DEFAULT E'0', 
186
  PRIMARY KEY ("commConceptHierarchy_ID")
187
);
188

  
189
--
190
-- Table structure for table 'commCorrelation'
191
--
192

  
193
DROP TABLE IF EXISTS "commCorrelation";
194

  
195
CREATE TABLE "commCorrelation" (
196
  "COMMCORRELATION_ID" SERIAL NOT NULL, 
197
  "COMMSTATUS_ID" INTEGER NOT NULL, 
198
  "COMMCONCEPT_ID" INTEGER NOT NULL, 
199
  "commConvergence" VARCHAR(20) NOT NULL, 
200
  "correlationStart" TIMESTAMP NOT NULL, 
201
  "correlationStop" TIMESTAMP, 
202
  "dba_src_ID" INTEGER, 
203
  PRIMARY KEY ("COMMCORRELATION_ID")
204
);
205

  
206
--
207
-- Table structure for table 'commInterpretation'
208
--
209

  
210
DROP TABLE IF EXISTS "commInterpretation";
211

  
212
CREATE TABLE "commInterpretation" (
213
  "COMMINTERPRETATION_ID" SERIAL NOT NULL, 
214
  "COMMCLASS_ID" INTEGER NOT NULL, 
215
  "COMMCONCEPT_ID" INTEGER, 
216
  "commcode" VARCHAR(34), 
217
  "commname" VARCHAR(200), 
218
  "classFit" VARCHAR(50), 
219
  "classConfidence" VARCHAR(15), 
220
  "commAuthority_ID" INTEGER, 
221
  "notes" TEXT, 
222
  "type" /*BOOLEAN*/INTEGER DEFAULT E'0', 
223
  "nomenclaturalType" /*BOOLEAN*/INTEGER DEFAULT E'0', 
224
  "dba_src_ID" INTEGER, 
225
  "framework_id" INTEGER, 
226
  "primaryDetermination" /*BOOLEAN*/INTEGER DEFAULT E'0', 
227
  "primaryDeterminationStatus" INTEGER DEFAULT 0, 
228
  "primaryComments" TEXT, 
229
  "primaryStartDate" TIMESTAMP, 
230
  "primarySTOPDate" TIMESTAMP, 
231
  "dba_interpretationStatus" VARCHAR(255), 
232
  "previousFit" VARCHAR(50), 
233
  "orderDeterminationForEvent" INTEGER, 
234
  "duplicateDetermination" /*BOOLEAN*/INTEGER DEFAULT E'0', 
235
  PRIMARY KEY ("COMMINTERPRETATION_ID")
236
);
237

  
238
--
239
-- Table structure for table 'commLineage'
240
--
241

  
242
DROP TABLE IF EXISTS "commLineage";
243

  
244
CREATE TABLE "commLineage" (
245
  "COMMLINEAGE_ID" SERIAL NOT NULL, 
246
  "parentCommStatus_ID" INTEGER NOT NULL, 
247
  "childCommStatus_ID" INTEGER NOT NULL, 
248
  "dba_src_ID" INTEGER, 
249
  PRIMARY KEY ("COMMLINEAGE_ID")
250
);
251

  
252
--
253
-- Table structure for table 'commName'
254
--
255

  
256
DROP TABLE IF EXISTS "commName";
257

  
258
CREATE TABLE "commName" (
259
  "COMMNAME_ID" SERIAL NOT NULL, 
260
  "commName" TEXT NOT NULL, 
261
  "reference_ID" INTEGER, 
262
  "dateEntered" TIMESTAMP, 
263
  "dba_src_ID" INTEGER, 
264
  PRIMARY KEY ("COMMNAME_ID")
265
);
266

  
267
--
268
-- Table structure for table 'commStatus'
269
--
270

  
271
DROP TABLE IF EXISTS "commStatus";
272

  
273
CREATE TABLE "commStatus" (
274
  "COMMSTATUS_ID" SERIAL NOT NULL, 
275
  "COMMCONCEPT_ID" INTEGER NOT NULL, 
276
  "reference_ID" INTEGER, 
277
  "commConceptStatus" VARCHAR(20) NOT NULL, 
278
  "commParent_ID" INTEGER, 
279
  "commLevel" VARCHAR(80), 
280
  "startDate" TIMESTAMP NOT NULL, 
281
  "stopDate" TIMESTAMP, 
282
  "commPartyComments" TEXT, 
283
  "PARTY_ID" INTEGER NOT NULL, 
284
  "dba_src_ID" INTEGER, 
285
  "accessionCode" VARCHAR(100), 
286
  PRIMARY KEY ("COMMSTATUS_ID")
287
);
288

  
289
--
290
-- Table structure for table 'commUsage'
291
--
292

  
293
DROP TABLE IF EXISTS "commUsage";
294

  
295
CREATE TABLE "commUsage" (
296
  "COMMUSAGE_ID" SERIAL NOT NULL, 
297
  "COMMNAME_ID" INTEGER NOT NULL, 
298
  "commName" TEXT, 
299
  "COMMCONCEPT_ID" INTEGER, 
300
  "usageStart" TIMESTAMP, 
301
  "usageStop" TIMESTAMP, 
302
  "commNameStatus" VARCHAR(20), 
303
  "classSystem" VARCHAR(50), 
304
  "PARTY_ID" INTEGER, 
305
  "COMMSTATUS_ID" INTEGER, 
306
  "dba_src_ID" INTEGER, 
307
  PRIMARY KEY ("COMMUSAGE_ID")
308
);
309

  
310
--
311
-- Table structure for table 'coverIndex'
312
--
313

  
314
DROP TABLE IF EXISTS "coverIndex";
315

  
316
CREATE TABLE "coverIndex" (
317
  "COVERINDEX_ID" SERIAL NOT NULL, 
318
  "COVERMETHOD_ID" INTEGER NOT NULL, 
319
  "coverCode" VARCHAR(10) NOT NULL, 
320
  "upperLimit" DOUBLE PRECISION NULL, 
321
  "lowerLimit" DOUBLE PRECISION NULL, 
322
  "coverPercent" DOUBLE PRECISION /*NULL*/ NOT NULL, 
323
  "indexDescription" TEXT, 
324
  "dba_src_ID" INTEGER, 
325
  PRIMARY KEY ("COVERINDEX_ID")
326
);
327

  
328
--
329
-- Table structure for table 'coverMethod'
330
--
331

  
332
DROP TABLE IF EXISTS "coverMethod";
333

  
334
CREATE TABLE "coverMethod" (
335
  "COVERMETHOD_ID" SERIAL NOT NULL, 
336
  "reference_ID" INTEGER, 
337
  "coverType" VARCHAR(30) NOT NULL, 
338
  "coverEstimationMethod" VARCHAR(80), 
339
  "accessionCode" VARCHAR(100), 
340
  "dba_src_ID" INTEGER, 
341
  PRIMARY KEY ("COVERMETHOD_ID")
342
);
343

  
344
--
345
-- Table structure for table 'cust_cvs_SoilDepth'
346
--
347

  
348
DROP TABLE IF EXISTS "cust_cvs_SoilDepth";
349

  
350
CREATE TABLE "cust_cvs_SoilDepth" (
351
  "DepthID" SERIAL NOT NULL, 
352
  "observation_ID" INTEGER, 
353
  "module" VARCHAR(4), 
354
  "corner" VARCHAR(4), 
355
  "depth" DOUBLE PRECISION NULL, 
356
  PRIMARY KEY ("DepthID")
357
);
358

  
359
--
360
-- Table structure for table 'cvs_taxonAlt_translate'
361
--
362

  
363
DROP TABLE IF EXISTS "cvs_taxonAlt_translate";
364

  
365
CREATE TABLE "cvs_taxonAlt_translate" (
366
  "CVS_taxonAlt_ID" SERIAL NOT NULL, 
367
  "SppID" INTEGER, 
368
  "sciNAmeComplex" VARCHAR(200), 
369
  "sciNAme" VARCHAR(200), 
370
  "plantAccessionCode" VARCHAR(80), 
371
  PRIMARY KEY ("CVS_taxonAlt_ID")
372
);
373

  
374
--
375
-- Table structure for table 'definedValue'
376
--
377

  
378
DROP TABLE IF EXISTS "definedValue";
379

  
380
CREATE TABLE "definedValue" (
381
  "DEFINEDVALUE_ID" SERIAL NOT NULL, 
382
  "USERDEFINED_ID" INTEGER NOT NULL, 
383
  "tableRecord_ID" INTEGER NOT NULL, 
384
  "definedValue" TEXT NOT NULL, 
385
  "dba_src_ID" INTEGER, 
386
  PRIMARY KEY ("DEFINEDVALUE_ID")
387
);
388

  
389
--
390
-- Table structure for table 'disturbanceObs'
391
--
392

  
393
DROP TABLE IF EXISTS "disturbanceObs";
394

  
395
CREATE TABLE "disturbanceObs" (
396
  "disturbanceObs_ID" SERIAL NOT NULL, 
397
  "OBSERVATION_ID" INTEGER NOT NULL, 
398
  "disturbanceType" VARCHAR(30) NOT NULL, 
399
  "disturbanceIntensity" VARCHAR(30), 
400
  "disturbanceAge" DOUBLE PRECISION NULL, 
401
  "disturbanceExtent" DOUBLE PRECISION NULL, 
402
  "disturbanceComment" TEXT, 
403
  "dba_src_ID" INTEGER, 
404
  PRIMARY KEY ("disturbanceObs_ID")
405
);
406

  
407
--
408
-- Table structure for table 'embargo'
409
--
410

  
411
DROP TABLE IF EXISTS "embargo";
412

  
413
CREATE TABLE "embargo" (
414
  "embargo_ID" SERIAL NOT NULL, 
415
  "plot_ID" INTEGER NOT NULL, 
416
  "embargoReason" TEXT NOT NULL, 
417
  "embargoStart" TIMESTAMP NOT NULL, 
418
  "embargoStop" TIMESTAMP NOT NULL, 
419
  "defaultStatus" INTEGER NOT NULL, 
420
  "dba_src_ID" INTEGER, 
421
  PRIMARY KEY ("embargo_ID")
422
);
423

  
424
--
425
-- Table structure for table 'entry_CarSpList'
426
--
427

  
428
DROP TABLE IF EXISTS "entry_CarSpList";
429

  
430
CREATE TABLE "entry_CarSpList" (
431
  "sppID" SERIAL NOT NULL, 
432
  "FAMILY" VARCHAR(255), 
433
  "GENUS" VARCHAR(255), 
434
  "X" VARCHAR(5), 
435
  "SPECIES" VARCHAR(255), 
436
  "TRI" VARCHAR(8), 
437
  "TRI_NAME" VARCHAR(255), 
438
  "QUAD" VARCHAR(8), 
439
  "QUAD_NAME" VARCHAR(255), 
440
  "AUTHOR" VARCHAR(255), 
441
  "SCIENTIFIC_NAME_WITH_AUTHORS" VARCHAR(255), 
442
  "SCIENTIFIC_NAME" VARCHAR(255), 
443
  "NC_Std" DOUBLE PRECISION NULL, 
444
  "NC_CODE" VARCHAR(9), 
445
  "SynCode" VARCHAR(12), 
446
  "SynID" INTEGER, 
447
  "reference_ID" INTEGER, 
448
  "SOURCE" VARCHAR(255), 
449
  "party_ID" INTEGER, 
450
  "perspectiveDate" TIMESTAMP, 
451
  "DUKE_CODE" VARCHAR(5), 
452
  "USDA_CODE" VARCHAR(10), 
453
  "US_Synonym" VARCHAR(255), 
454
  "US_COMMON_NAME" VARCHAR(255), 
455
  "bln_newRec" /*BOOLEAN*/INTEGER DEFAULT E'-1', 
456
  "plantConcept_ID" INTEGER, 
457
  "plantAccessionCode" VARCHAR(255), 
458
  "plantGroupAccessionCodes" TEXT, 
459
  "includeInPicklistNow" /*BOOLEAN*/INTEGER DEFAULT E'-1', 
460
  "USDA_Woody" VARCHAR(2), 
461
  "Woody" VARCHAR(1), 
462
  "Duration" VARCHAR(255), 
463
  "US_Nativity" VARCHAR(255), 
464
  "GrowthForm_extended" VARCHAR(255), 
465
  "GrowthForm_short" VARCHAR(255), 
466
  PRIMARY KEY ("sppID")
467
);
468

  
469
--
470
-- Table structure for table 'entry_cover'
471
--
472

  
473
DROP TABLE IF EXISTS "entry_cover";
474

  
475
CREATE TABLE "entry_cover" (
476
  "HerbLineID" SERIAL NOT NULL, 
477
  "AlternateOrder" DOUBLE PRECISION NULL, 
478
  "plotID" INTEGER NOT NULL, 
479
  "NC_Code" INTEGER, 
480
  "altReference_ID" INTEGER, 
481
  "unknownSp" VARCHAR(50), 
482
  "CBS_1" VARCHAR(1), 
483
  "CBS_2" VARCHAR(1), 
484
  "CBS_3" VARCHAR(1), 
485
  "CBS_4" VARCHAR(1), 
486
  "CBS_5" VARCHAR(1), 
487
  "CBS_6" VARCHAR(1), 
488
  "CBS_7" VARCHAR(1), 
489
  "CBS_8" VARCHAR(1), 
490
  "CBS_9" VARCHAR(1), 
491
  "CBS_10" VARCHAR(1), 
492
  "CBS_11" VARCHAR(1), 
493
  "CBS_12" VARCHAR(1), 
494
  "col1" VARCHAR(1), 
495
  "col2" VARCHAR(1), 
496
  "col3" VARCHAR(1), 
497
  "col4" VARCHAR(1), 
498
  "col5" VARCHAR(1), 
499
  "col6" VARCHAR(1), 
500
  "col7" VARCHAR(1), 
501
  "col8" VARCHAR(1), 
502
  "col9" VARCHAR(1), 
503
  "col10" VARCHAR(1), 
504
  "col11" VARCHAR(1), 
505
  "col12" VARCHAR(1), 
506
  "col13" VARCHAR(1), 
507
  "col14" VARCHAR(1), 
508
  "col15" VARCHAR(1), 
509
  "col16" VARCHAR(1), 
510
  "col17" VARCHAR(1), 
511
  "col18" VARCHAR(1), 
512
  "col19" VARCHAR(1), 
513
  "col20" VARCHAR(1), 
514
  "avcov" VARCHAR(1), 
515
  "notes" VARCHAR(255), 
516
  "errors" TEXT, 
517
  "NC_Code_History" TEXT, 
518
  "duplicate" INTEGER DEFAULT 0, 
519
  "TreeFillin" VARCHAR(50), 
520
  "userDefined1" VARCHAR(255), 
521
  "userDefined2" VARCHAR(255), 
522
  "userDefined3" VARCHAR(255), 
523
  "userDefined4" VARCHAR(255), 
524
  "userDefined5" VARCHAR(255), 
525
  "userDefined6" VARCHAR(255), 
526
  "userDefined7" VARCHAR(255), 
527
  "userDefined8" VARCHAR(255), 
528
  "userDefined9" VARCHAR(255), 
529
  "userDefined10" VARCHAR(255), 
530
  "userDefined11" VARCHAR(255), 
531
  "userDefined12" VARCHAR(255), 
532
  "userDefined13" VARCHAR(255), 
533
  "userDefined14" VARCHAR(255), 
534
  "userDefined15" VARCHAR(255), 
535
  "userDefined16" VARCHAR(255), 
536
  "log_createDate" TIMESTAMP DEFAULT E'Now()', 
537
  "log_createUser" VARCHAR(50), 
538
  "log_modifiedDate" TIMESTAMP DEFAULT E'Now()', 
539
  "log_modifiedUser" VARCHAR(50), 
540
  "collectionFlag" VARCHAR(1), 
541
  PRIMARY KEY ("HerbLineID")
542
);
543

  
544
--
545
-- Table structure for table 'entry_plots_cover'
546
--
547

  
548
DROP TABLE IF EXISTS "entry_plots_cover";
549

  
550
CREATE TABLE "entry_plots_cover" (
551
  "plotID" SERIAL NOT NULL, 
552
  "project" INTEGER, 
553
  "team" VARCHAR(6), 
554
  "plot" VARCHAR(12), 
555
  "cvs_level" INTEGER, 
556
  "date" TIMESTAMP, 
557
  "depth" INTEGER, 
558
  "Ares_H" DOUBLE PRECISION NULL, 
559
  "notesPlot" VARCHAR(255), 
560
  "str1" VARCHAR(10) DEFAULT E'H', 
561
  "str2" VARCHAR(10) DEFAULT E'S', 
562
  "str3" VARCHAR(10) DEFAULT E'U', 
563
  "str4" VARCHAR(10) DEFAULT E'C', 
564
  "str5" VARCHAR(10) DEFAULT E'E', 
565
  "str6" VARCHAR(10), 
566
  "str7" VARCHAR(10), 
567
  "str8" VARCHAR(10), 
568
  "str9" VARCHAR(10), 
569
  "str10" VARCHAR(10), 
570
  "str11" VARCHAR(10), 
571
  "str12" VARCHAR(10), 
572
  "head1" VARCHAR(1), 
573
  "head2" VARCHAR(1), 
574
  "head3" VARCHAR(1), 
575
  "head4" VARCHAR(1), 
576
  "head5" VARCHAR(1), 
577
  "head6" VARCHAR(1), 
578
  "head7" VARCHAR(1), 
579
  "head8" VARCHAR(1), 
580
  "head9" VARCHAR(1), 
581
  "head10" VARCHAR(1), 
582
  "head11" VARCHAR(1), 
583
  "head12" VARCHAR(1), 
584
  "head13" VARCHAR(1), 
585
  "head14" VARCHAR(1), 
586
  "head15" VARCHAR(1), 
587
  "head16" VARCHAR(1), 
588
  "head17" VARCHAR(1), 
589
  "head18" VARCHAR(1), 
590
  "head19" VARCHAR(1), 
591
  "head20" VARCHAR(1), 
592
  "headerrors" TEXT, 
593
  "plotSrc" VARCHAR(50), 
594
  "log_pcreateDate" TIMESTAMP DEFAULT E'Now()', 
595
  "log_pcreateUser" VARCHAR(50), 
596
  "log_pmodifiedDate" TIMESTAMP DEFAULT E'Now()', 
597
  "log_pmodifiedUser" VARCHAR(50), 
598
  "vmd_year" INTEGER DEFAULT 0, 
599
  "cp_entry_plotDone" /*BOOLEAN*/INTEGER DEFAULT E'0', 
600
  "cp_yearNum" INTEGER, 
601
  "cp_authorObsCode" VARCHAR(255), 
602
  PRIMARY KEY ("plotID")
603
);
604

  
605
--
606
-- Table structure for table 'entry_plots_stems'
607
--
608

  
609
DROP TABLE IF EXISTS "entry_plots_stems";
610

  
611
CREATE TABLE "entry_plots_stems" (
612
  "plotID" SERIAL NOT NULL, 
613
  "project" INTEGER, 
614
  "team" VARCHAR(6), 
615
  "plot" VARCHAR(12), 
616
  "cvs_level" INTEGER, 
617
  "date" TIMESTAMP, 
618
  "Ares" DOUBLE PRECISION NULL, 
619
  "PlotSubSeedling" INTEGER, 
620
  "PlotSubSapling" INTEGER, 
621
  "PlotSubTree" INTEGER, 
622
  "SubSamplingNarrative" TEXT, 
623
  "notesPlot" VARCHAR(255), 
624
  "notesPlot_indiv" VARCHAR(255), 
625
  "headerrors" TEXT, 
626
  "minimumDBH" DOUBLE PRECISION NULL, 
627
  "minimumdgh" DOUBLE PRECISION NULL, 
628
  "minimumHt" DOUBLE PRECISION NULL, 
629
  "AllStemsPlanted" /*BOOLEAN*/INTEGER DEFAULT E'0', 
630
  "log_pcreateDate" TIMESTAMP DEFAULT E'Now()', 
631
  "log_pcreateUser" VARCHAR(50), 
632
  "log_pmodifiedDate" TIMESTAMP DEFAULT E'Now()', 
633
  "log_pmodifiedUser" VARCHAR(50), 
634
  "vmd_year" INTEGER DEFAULT 0, 
635
  "cp_entry_plotDone" /*BOOLEAN*/INTEGER DEFAULT E'0', 
636
  "cp_yearNum" INTEGER, 
637
  "cp_authorObsCode" VARCHAR(255), 
638
  "plotXYReversedOrientation" /*BOOLEAN*/INTEGER DEFAULT E'0', 
639
  PRIMARY KEY ("plotID")
640
);
641

  
642
--
643
-- Table structure for table 'entry_stems'
644
--
645

  
646
DROP TABLE IF EXISTS "entry_stems";
647

  
648
CREATE TABLE "entry_stems" (
649
  "TreeLineID" SERIAL NOT NULL, 
650
  "AlternateOrder" DOUBLE PRECISION NULL, 
651
  "plotID" INTEGER NOT NULL, 
652
  "NC_Code" INTEGER, 
653
  "altReference_ID" INTEGER, 
654
  "unknownSp" VARCHAR(50), 
655
  "Module" VARCHAR(2), 
656
  "isPlanted" VARCHAR(2), 
657
  "Subseedling" INTEGER, 
658
  "CHt_0_50" INTEGER DEFAULT 0, 
659
  "CHt_50_100" INTEGER DEFAULT 0, 
660
  "CHt_100_137" INTEGER DEFAULT 0, 
661
  "SubSapling" INTEGER, 
662
  "C0_1" INTEGER NOT NULL DEFAULT 0, 
663
  "C1_2" INTEGER NOT NULL DEFAULT 0, 
664
  "SubTree" INTEGER, 
665
  "C2Plus" INTEGER NOT NULL DEFAULT 0, 
666
  "C5Plus" INTEGER NOT NULL DEFAULT 0, 
667
  "C10Plus" INTEGER NOT NULL DEFAULT 0, 
668
  "C15Plus" INTEGER NOT NULL DEFAULT 0, 
669
  "C20Plus" INTEGER NOT NULL DEFAULT 0, 
670
  "C25Plus" INTEGER NOT NULL DEFAULT 0, 
671
  "C30Plus" INTEGER NOT NULL DEFAULT 0, 
672
  "C35Plus" INTEGER NOT NULL DEFAULT 0, 
673
  "BigStem1" INTEGER, 
674
  "BigStem2" INTEGER, 
675
  "BigStem3" INTEGER, 
676
  "BigStem4" INTEGER, 
677
  "BigStem5" INTEGER, 
678
  "BigStem6" INTEGER, 
679
  "BigStem7" INTEGER, 
680
  "BigStem8" INTEGER, 
681
  "BigStem9" INTEGER, 
682
  "BigStem10" INTEGER, 
683
  "BigStem11" INTEGER, 
684
  "BigStem12" INTEGER, 
685
  "Notes" VARCHAR(255), 
686
  "errors" TEXT, 
687
  "NC_Code_History" TEXT, 
688
  "duplicate" INTEGER DEFAULT 0, 
689
  "TreeSummarySamplingCase" DOUBLE PRECISION NULL, 
690
  "IsIndividualRecord" /*BOOLEAN*/INTEGER DEFAULT E'0', 
691
  "stemIDCode" VARCHAR(20), 
692
  "stemSource" VARCHAR(10), 
693
  "stemHealth" VARCHAR(50), 
694
  "stemComment" VARCHAR(200), 
695
  "stemX" DOUBLE PRECISION NULL, 
696
  "stemY" DOUBLE PRECISION NULL, 
697
  "dgh" DOUBLE PRECISION NULL, 
698
  "Height" DOUBLE PRECISION NULL, 
699
  "DBH" DOUBLE PRECISION NULL, 
700
  "resprout" /*BOOLEAN*/INTEGER DEFAULT E'0', 
701
  "userDefined1" VARCHAR(255), 
702
  "userDefined2" VARCHAR(255), 
703
  "userDefined3" VARCHAR(255), 
704
  "userDefined4" VARCHAR(255), 
705
  "userDefined5" VARCHAR(255), 
706
  "userDefined6" VARCHAR(255), 
707
  "userDefined7" VARCHAR(255), 
708
  "userDefined8" VARCHAR(255), 
709
  "userDefined9" VARCHAR(255), 
710
  "userDefined10" VARCHAR(255), 
711
  "userDefined11" VARCHAR(255), 
712
  "userDefined12" VARCHAR(255), 
713
  "userDefined13" VARCHAR(255), 
714
  "userDefined14" VARCHAR(255), 
715
  "userDefined15" VARCHAR(255), 
716
  "userDefined16" VARCHAR(255), 
717
  "record_src" VARCHAR(50), 
718
  "log_createDate" TIMESTAMP DEFAULT E'Now()', 
719
  "log_createUser" VARCHAR(50), 
720
  "log_modifiedDate" TIMESTAMP DEFAULT E'Now()', 
721
  "log_modifiedUser" VARCHAR(50), 
722
  "vmdMapSequence" INTEGER, 
723
  "vmd_recoverySortOrder" TIMESTAMP, 
724
  PRIMARY KEY ("TreeLineID")
725
);
726

  
727
--
728
-- Table structure for table 'entryToolQueue'
729
--
730

  
731
DROP TABLE IF EXISTS "entryToolQueue";
732

  
733
CREATE TABLE "entryToolQueue" (
734
  "entryToolQueue_ID" SERIAL NOT NULL, 
735
  "EntrytoolFileName" VARCHAR(255), 
736
  "etStatus_ID" INTEGER, 
737
  "originalETName" VARCHAR(255), 
738
  "Emailer" VARCHAR(255), 
739
  "EmailAddress" VARCHAR(255), 
740
  "batch" VARCHAR(255), 
741
  "ProjectNames" VARCHAR(255), 
742
  "countProjects" INTEGER, 
743
  "projectCodes" VARCHAR(255), 
744
  "plots" DOUBLE PRECISION NULL, 
745
  "calendarYears" VARCHAR(255), 
746
  "newplots" INTEGER, 
747
  "chkProjectNumber" VARCHAR(255), 
748
  "ReceivedDate" TIMESTAMP, 
749
  "AcknEmailSentDate" TIMESTAMP, 
750
  "ImportedToNewETDate" TIMESTAMP, 
751
  "ErrorDetails" TEXT, 
752
  "ErrorCount" DOUBLE PRECISION NULL, 
753
  "ErrorsIgnoredCount" INTEGER, 
754
  "userMustResubmitDB" /*BOOLEAN*/INTEGER DEFAULT E'0', 
755
  "UpdLatLong" TIMESTAMP, 
756
  "MapURL" TEXT, 
757
  "SomeErrorsFixed" TIMESTAMP, 
758
  "UserEmailed" TIMESTAMP, 
759
  "UserFixedErrs" TIMESTAMP, 
760
  "usersFixesApplied" TIMESTAMP, 
761
  "UnfoldDate" TIMESTAMP, 
762
  "migrateToArchiveDBDate" TIMESTAMP, 
763
  "FilesArchived" TIMESTAMP, 
764
  "NOTES" VARCHAR(255), 
765
  "NotesToSender2" VARCHAR(255), 
766
  "etInitPath" VARCHAR(255), 
767
  "etImportedPath" VARCHAR(255), 
768
  "migrationGUID" VARCHAR(255), 
769
  PRIMARY KEY ("entryToolQueue_ID")
770
);
771

  
772
--
773
-- Table structure for table 'entrytoolQueueProject'
774
--
775

  
776
DROP TABLE IF EXISTS "entrytoolQueueProject";
777

  
778
CREATE TABLE "entrytoolQueueProject" (
779
  "entryToolQueueProject_ID" SERIAL NOT NULL, 
780
  "entryToolQueue_ID" INTEGER, 
781
  "projectCode" VARCHAR(255), 
782
  "projectName" VARCHAR(255), 
783
  "projectAccessionCode" VARCHAR(255), 
784
  "yearAfterProjectEstablishment" INTEGER, 
785
  "projectInArchive" /*BOOLEAN*/INTEGER DEFAULT E'0', 
786
  "plotsInArchiveProject" INTEGER, 
787
  "newPlotsNotInArchive" INTEGER, 
788
  "sampledStart" TIMESTAMP, 
789
  "sampledEnd" TIMESTAMP, 
790
  "obsCount" INTEGER, 
791
  "obsAlreadyInArchive" DOUBLE PRECISION NULL, 
792
  "newObs" INTEGER, 
793
  "newPeople" INTEGER, 
794
  "newTaxa" INTEGER, 
795
  "projectYrErrCount" INTEGER, 
796
  "projectYrErrsIgnored" INTEGER, 
797
  PRIMARY KEY ("entryToolQueueProject_ID")
798
);
799

  
800
--
801
-- Table structure for table 'fieldList'
802
--
803

  
804
DROP TABLE IF EXISTS "fieldList";
805

  
806
CREATE TABLE "fieldList" (
807
  "fieldList_ID" SERIAL NOT NULL, 
808
  "tableName" VARCHAR(50), 
809
  "fieldName" VARCHAR(50), 
810
  "listValue" VARCHAR(255), 
811
  "valueDesc" TEXT, 
812
  "sortOrd" DOUBLE PRECISION NULL, 
813
  "entry_displayValue" VARCHAR(255), 
814
  "entry_description" TEXT, 
815
  "entry_hideValue" INTEGER, 
816
  "entry_sortingOrder" DOUBLE PRECISION NULL, 
817
  "entry_newRecord" /*BOOLEAN*/INTEGER DEFAULT E'0', 
818
  "entry_obsoleteValue" /*BOOLEAN*/INTEGER DEFAULT E'0', 
819
  "entry_obsoleteUseInstead" VARCHAR(255), 
820
  PRIMARY KEY ("fieldList_ID")
821
);
822

  
823
--
824
-- Table structure for table 'graphic'
825
--
826

  
827
DROP TABLE IF EXISTS "graphic";
828

  
829
CREATE TABLE "graphic" (
830
  "GRAPHIC_ID" SERIAL NOT NULL, 
831
  "OBSERVATION_ID" INTEGER NOT NULL, 
832
  "graphicName" VARCHAR(30), 
833
  "graphicLocation" TEXT, 
834
  "graphicDescription" TEXT, 
835
  "graphicType" VARCHAR(20), 
836
  "graphicDate" TIMESTAMP, 
837
  "graphicData" TEXT, 
838
  "dba_src_ID" INTEGER, 
839
  "accessionCode" VARCHAR(100), 
840
  PRIMARY KEY ("GRAPHIC_ID")
841
);
842

  
843
--
844
-- Table structure for table 'migrationEntity'
845
--
846

  
847
DROP TABLE IF EXISTS "migrationEntity";
848

  
849
CREATE TABLE "migrationEntity" (
850
  "migrationEntity_ID" SERIAL NOT NULL, 
851
  "migrationPkg_ID" INTEGER, 
852
  "tableName" VARCHAR(100), 
853
  "record_ID" INTEGER, 
854
  "sourceRecord_ID" INTEGER, 
855
  "entryDBPath" TEXT, 
856
  "migrationDBPath" TEXT, 
857
  PRIMARY KEY ("migrationEntity_ID")
858
);
859

  
860
--
861
-- Table structure for table 'migrationPackage'
862
--
863

  
864
DROP TABLE IF EXISTS "migrationPackage";
865

  
866
CREATE TABLE "migrationPackage" (
867
  "migrationPkg_ID" SERIAL NOT NULL, 
868
  "migrationGUID" VARCHAR(38), 
869
  "migrationName" VARCHAR(100), 
870
  "migrationDescription" TEXT, 
871
  "userName" VARCHAR(50), 
872
  "archiveFullPath" TEXT, 
873
  "entryFullPath" TEXT, 
874
  "migrationDBFullPath" TEXT, 
875
  "migrationDateStart" TIMESTAMP, 
876
  "migrationDateEnd" VARCHAR(50), 
877
  "totalRecordsAdded" INTEGER, 
878
  "plotsAdded" INTEGER, 
879
  "observationsAdded" INTEGER, 
880
  PRIMARY KEY ("migrationPkg_ID")
881
);
882

  
883
--
884
-- Table structure for table 'namedPlace'
885
--
886

  
887
DROP TABLE IF EXISTS "namedPlace";
888

  
889
CREATE TABLE "namedPlace" (
890
  "NAMEDPLACE_ID" SERIAL NOT NULL, 
891
  "placeSystem" VARCHAR(50), 
892
  "placeName" VARCHAR(100) NOT NULL, 
893
  "placeDescription" TEXT, 
894
  "placeCode" VARCHAR(15), 
895
  "owner" VARCHAR(100), 
896
  "reference_ID" INTEGER, 
897
  "accessionCode" VARCHAR(100), 
898
  "dba_src_ID" INTEGER, 
899
  PRIMARY KEY ("NAMEDPLACE_ID")
900
);
901

  
902
--
903
-- Table structure for table 'namedPlaceCorrelation'
904
--
905

  
906
DROP TABLE IF EXISTS "namedPlaceCorrelation";
907

  
908
CREATE TABLE "namedPlaceCorrelation" (
909
  "NAMEDPLACECORRELATION_ID" SERIAL NOT NULL, 
910
  "PARENTPLACE_ID" INTEGER NOT NULL, 
911
  "CHILDPLACE_ID" INTEGER NOT NULL, 
912
  "placeConvergence" VARCHAR(20) NOT NULL, 
913
  PRIMARY KEY ("NAMEDPLACECORRELATION_ID")
914
);
915

  
916
--
917
-- Table structure for table 'note'
918
--
919

  
920
DROP TABLE IF EXISTS "note";
921

  
922
CREATE TABLE "note" (
923
  "NOTE_ID" SERIAL NOT NULL, 
924
  "NOTELINK_ID" INTEGER NOT NULL, 
925
  "PARTY_ID" INTEGER, 
926
  "ROLE_ID" INTEGER, 
927
  "noteDate" TIMESTAMP, 
928
  "noteType" VARCHAR(20) NOT NULL, 
929
  "noteText" TEXT NOT NULL, 
930
  "dba_src_ID" INTEGER, 
931
  "accessionCode" VARCHAR(100), 
932
  PRIMARY KEY ("NOTE_ID")
933
);
934

  
935
--
936
-- Table structure for table 'noteLink'
937
--
938

  
939
DROP TABLE IF EXISTS "noteLink";
940

  
941
CREATE TABLE "noteLink" (
942
  "NOTELINK_ID" SERIAL NOT NULL, 
943
  "tableName" VARCHAR(50) NOT NULL, 
944
  "attributeName" VARCHAR(50), 
945
  "tableRecord" INTEGER NOT NULL, 
946
  "dba_src_ID" INTEGER, 
947
  PRIMARY KEY ("NOTELINK_ID")
948
);
949

  
950
--
951
-- Table structure for table 'observation'
952
--
953

  
954
DROP TABLE IF EXISTS "observation";
955

  
956
CREATE TABLE "observation" (
957
  "OBSERVATION_ID" SERIAL NOT NULL, 
958
  "PREVIOUSOBS_ID" INTEGER, 
959
  "PLOT_ID" INTEGER NOT NULL, 
960
  "PROJECT_ID" INTEGER, 
961
  "authorObsCode" VARCHAR(255), 
962
  "obsStartDate" TIMESTAMP, 
963
  "obsEndDate" TIMESTAMP, 
964
  "dateAccuracy" VARCHAR(30), 
965
  "dateEntered" TIMESTAMP DEFAULT E'=Now()', 
966
  "COVERMETHOD_ID" INTEGER, 
967
  "coverDispersion" VARCHAR(30), 
968
  "autoTaxonCover" /*BOOLEAN*/INTEGER DEFAULT E'0', 
969
  "STRATUMMETHOD_ID" INTEGER, 
970
  "methodNarrative" TEXT, 
971
  "taxonObservationArea" DOUBLE PRECISION NULL, 
972
  "stemSizeLimit" DOUBLE PRECISION NULL, 
973
  "stemObservationArea" DOUBLE PRECISION NULL, 
974
  "stemSampleMethod" VARCHAR(30), 
975
  "originalData" TEXT, 
976
  "effortLevel" VARCHAR(30), 
977
  "plotValidationLevel" INTEGER, 
978
  "floristicQuality" VARCHAR(30), 
979
  "bryophyteQuality" VARCHAR(30), 
980
  "lichenQuality" VARCHAR(30), 
981
  "observationNarrative" TEXT, 
982
  "landscapeNarrative" TEXT, 
983
  "homogeneity" VARCHAR(255), 
984
  "phenologicAspect" VARCHAR(255), 
985
  "representativeness" VARCHAR(255), 
986
  "standMaturity" VARCHAR(255), 
987
  "successionalStatus" TEXT, 
988
  "basalArea" DOUBLE PRECISION NULL, 
989
  "hydrologicRegime" VARCHAR(255), 
990
  "soilMoistureRegime" VARCHAR(255), 
991
  "soilDrainage" VARCHAR(255), 
992
  "waterSalinity" VARCHAR(255), 
993
  "waterDepth" DOUBLE PRECISION NULL, 
994
  "shoreDistance" DOUBLE PRECISION NULL, 
995
  "soilDepth" DOUBLE PRECISION NULL, 
996
  "organicDepth" DOUBLE PRECISION NULL, 
997
  "SOILTAXON_ID" INTEGER, 
998
  "soilTaxonSrc" VARCHAR(200), 
999
  "soilTaxonComplex" VARCHAR(255), 
1000
  "soilMapUnit" VARCHAR(255), 
1001
  "percentBedRock" DOUBLE PRECISION NULL, 
1002
  "percentRockGravel" DOUBLE PRECISION NULL, 
1003
  "percentWood" DOUBLE PRECISION NULL, 
1004
  "percentLitter" DOUBLE PRECISION NULL, 
1005
  "percentBareSoil" DOUBLE PRECISION NULL, 
1006
  "percentWater" DOUBLE PRECISION NULL, 
1007
  "percentOther" DOUBLE PRECISION NULL, 
1008
  "nameOther" VARCHAR(30), 
1009
  "treeHt" DOUBLE PRECISION NULL, 
1010
  "shrubHt" DOUBLE PRECISION NULL, 
1011
  "fieldHt" DOUBLE PRECISION NULL, 
1012
  "nonvascularHt" DOUBLE PRECISION NULL, 
1013
  "submergedHt" DOUBLE PRECISION NULL, 
1014
  "treeCover" DOUBLE PRECISION NULL, 
1015
  "shrubCover" DOUBLE PRECISION NULL, 
1016
  "fieldCover" DOUBLE PRECISION NULL, 
1017
  "nonvascularCover" DOUBLE PRECISION NULL, 
1018
  "floatingCover" DOUBLE PRECISION NULL, 
1019
  "submergedCover" DOUBLE PRECISION NULL, 
1020
  "dominantStratum" VARCHAR(40), 
1021
  "growthform1Type" VARCHAR(40), 
1022
  "growthform2Type" VARCHAR(40), 
1023
  "growthform3Type" VARCHAR(40), 
1024
  "growthform1Cover" DOUBLE PRECISION NULL, 
1025
  "growthform2Cover" DOUBLE PRECISION NULL, 
1026
  "growthform3Cover" DOUBLE PRECISION NULL, 
1027
  "totalCover" DOUBLE PRECISION NULL, 
1028
  "accessionCode" VARCHAR(100), 
1029
  "notesPublic" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1030
  "notesMgt" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1031
  "revisions" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1032
  "cust_cvs_CowardinSystem" VARCHAR(100), 
1033
  "cust_cvs_mcnab_LFI_asp" DOUBLE PRECISION NULL, 
1034
  "cust_cvs_mcnab_LFI_45" DOUBLE PRECISION NULL, 
1035
  "cust_cvs_mcnab_LFI_90" DOUBLE PRECISION NULL, 
1036
  "cust_cvs_mcnab_LFI_135" DOUBLE PRECISION NULL, 
1037
  "cust_cvs_mcnab_LFI_180" DOUBLE PRECISION NULL, 
1038
  "cust_cvs_mcnab_LFI_225" DOUBLE PRECISION NULL, 
1039
  "cust_cvs_mcnab_LFI_270" DOUBLE PRECISION NULL, 
1040
  "cust_cvs_mcnab_LFI_315" DOUBLE PRECISION NULL, 
1041
  "cust_cvs_mcnab_TSI_asp" DOUBLE PRECISION NULL, 
1042
  "cust_cvs_mcnab_TSI_45" DOUBLE PRECISION NULL, 
1043
  "cust_cvs_mcnab_TSI_90" DOUBLE PRECISION NULL, 
1044
  "cust_cvs_mcnab_TSI_135" DOUBLE PRECISION NULL, 
1045
  "cust_cvs_mcnab_TSI_180" DOUBLE PRECISION NULL, 
1046
  "cust_cvs_mcnab_TSI_225" DOUBLE PRECISION NULL, 
1047
  "cust_cvs_mcnab_TSI_270" DOUBLE PRECISION NULL, 
1048
  "cust_cvs_mcnab_TSI_315" DOUBLE PRECISION NULL, 
1049
  "cust_cvs_mcnab_LFI" DOUBLE PRECISION NULL, 
1050
  "cust_cvs_mcnab_TSI" DOUBLE PRECISION NULL, 
1051
  "cust_cvs_LeafType" VARCHAR(100), 
1052
  "cust_cvs_LeafPhenology" VARCHAR(100), 
1053
  "cust_cvs_CanopyHeight" DOUBLE PRECISION NULL, 
1054
  "cust_cvs_compassType" VARCHAR(10), 
1055
  "cust_cvs_LocationSource" VARCHAR(50), 
1056
  "cust_cvs_GPSLocationX" DOUBLE PRECISION NULL, 
1057
  "cust_cvs_GPSLocationY" DOUBLE PRECISION NULL, 
1058
  "cust_cvs_Ownership" VARCHAR(100), 
1059
  "cust_cvs_taxaRichness" INTEGER, 
1060
  "cust_cvs_lengthSoilProbe" DOUBLE PRECISION NULL, 
1061
  "cust_cvs_percentHistosol" DOUBLE PRECISION NULL, 
1062
  "cust_cvs_percentBedrock" DOUBLE PRECISION NULL, 
1063
  "cust_cvs_percentBoulder" DOUBLE PRECISION NULL, 
1064
  "cust_cvs_percentGravelCobble" DOUBLE PRECISION NULL, 
1065
  "cust_cvs_percentMineralSoil" DOUBLE PRECISION NULL, 
1066
  "cust_cvs_percentCWD" DOUBLE PRECISION NULL, 
1067
  "cust_cvs_percentFWD" DOUBLE PRECISION NULL, 
1068
  "cust_cvs_percentDuff" DOUBLE PRECISION NULL, 
1069
  "cust_cvs_percentLitter" DOUBLE PRECISION NULL, 
1070
  "cust_cvs_percentNonVasc" DOUBLE PRECISION NULL, 
1071
  "cust_cvs_percentWater" DOUBLE PRECISION NULL, 
1072
  "cust_cvs_percentOther" DOUBLE PRECISION NULL, 
1073
  "cust_cvs_percentOtherName" VARCHAR(80), 
1074
  "cust_cvs_samplingLevel" INTEGER, 
1075
  "cust_cvs_postDsgPoly" VARCHAR(255), 
1076
  "cust_cvs_stemsSampled" INTEGER, 
1077
  "cust_cvs_stemSamplingNarrative" TEXT, 
1078
  "cust_eep_plotLastPlantedDate" TIMESTAMP, 
1079
  "cust_eep_plotNotSampled" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1080
  "cust_eep_plotNotSampledReason" TEXT, 
1081
  "entry_ares_herbs" DOUBLE PRECISION NULL, 
1082
  "entry_ares_trees" DOUBLE PRECISION NULL, 
1083
  "entry_currentLandUse" TEXT, 
1084
  "entry_depth" INTEGER, 
1085
  "entry_elevationUnits" INTEGER, 
1086
  "entry_formerLandUse" TEXT, 
1087
  "entry_identificationNarrative" TEXT, 
1088
  "entry_IntensiveModuleList" VARCHAR(10), 
1089
  "entry_moduleSize_Overall" DOUBLE PRECISION NULL, 
1090
  "entry_moduleSizeX" DOUBLE PRECISION NULL, 
1091
  "entry_moduleSizeY" DOUBLE PRECISION NULL, 
1092
  "entry_photosTaken" VARCHAR(255), 
1093
  "entry_physClass" VARCHAR(100), 
1094
  "entry_plot_X" INTEGER, 
1095
  "entry_plot_Y" INTEGER, 
1096
  "entry_soilModulesSampled" VARCHAR(100), 
1097
  "entry_subsequentObsNum" INTEGER, 
1098
  "entry_taxonomicAuthority_ID" INTEGER, 
1099
  "entry_taxonomicAuthorityDate" TIMESTAMP, 
1100
  "entry_team" VARCHAR(6), 
1101
  "entry_plot" VARCHAR(12), 
1102
  "entry_numberOfModules" INTEGER, 
1103
  "errors" TEXT, 
1104
  "dba_src_ID" INTEGER, 
1105
  "dba_notes" TEXT, 
1106
  "numberOfTaxa" INTEGER, 
1107
  UNIQUE ("authorObsCode"), 
1108
  PRIMARY KEY ("OBSERVATION_ID")
1109
);
1110

  
1111
--
1112
-- Table structure for table 'observationContributor'
1113
--
1114

  
1115
DROP TABLE IF EXISTS "observationContributor";
1116

  
1117
CREATE TABLE "observationContributor" (
1118
  "OBSERVATIONCONTRIBUTOR_ID" SERIAL NOT NULL, 
1119
  "OBSERVATION_ID" INTEGER NOT NULL, 
1120
  "PARTY_ID" INTEGER NOT NULL, 
1121
  "ROLE_ID" INTEGER NOT NULL, 
1122
  "contributionDate" TIMESTAMP, 
1123
  "dba_src_ID" INTEGER, 
1124
  "unsure" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1125
  PRIMARY KEY ("OBSERVATIONCONTRIBUTOR_ID")
1126
);
1127

  
1128
--
1129
-- Table structure for table 'observationSynonym'
1130
--
1131

  
1132
DROP TABLE IF EXISTS "observationSynonym";
1133

  
1134
CREATE TABLE "observationSynonym" (
1135
  "OBSERVATIONSYNONYM_ID" SERIAL NOT NULL, 
1136
  "synonymObservation_ID" INTEGER NOT NULL, 
1137
  "primaryObservation_ID" INTEGER NOT NULL, 
1138
  "PARTY_ID" INTEGER NOT NULL, 
1139
  "ROLE_ID" INTEGER NOT NULL, 
1140
  "classStartDate" TIMESTAMP NOT NULL, 
1141
  "classStopDate" TIMESTAMP, 
1142
  "synonymComment" TEXT, 
1143
  "dba_src_ID" INTEGER, 
1144
  "accessionCode" VARCHAR(100), 
1145
  PRIMARY KEY ("OBSERVATIONSYNONYM_ID")
1146
);
1147

  
1148
--
1149
-- Table structure for table 'old__entry_summaryCommConcept'
1150
--
1151

  
1152
DROP TABLE IF EXISTS "old__entry_summaryCommConcept";
1153

  
1154
CREATE TABLE "old__entry_summaryCommConcept" (
1155
  "commConcept_ID" SERIAL NOT NULL, 
1156
  "commName" VARCHAR(255), 
1157
  "referenceText" VARCHAR(255), 
1158
  "scientific" VARCHAR(255), 
1159
  "translated" VARCHAR(255), 
1160
  "code" VARCHAR(255), 
1161
  "common" VARCHAR(255), 
1162
  "commLevel" VARCHAR(80), 
1163
  "alliance" VARCHAR(255), 
1164
  "reference_ID" INTEGER, 
1165
  "party_ID" INTEGER, 
1166
  "perspectiveDate" TIMESTAMP, 
1167
  "bln_newRec" /*BOOLEAN*/INTEGER DEFAULT E'-1', 
1168
  "accessionCode" VARCHAR(100), 
1169
  "includeInPicklistNow" /*BOOLEAN*/INTEGER DEFAULT E'-1', 
1170
  "PhysGroup" VARCHAR(255), 
1171
  "FormGroup" VARCHAR(255), 
1172
  "EcolGroup" VARCHAR(255), 
1173
  "4thApproxName" VARCHAR(255), 
1174
  "NatureServeUID" VARCHAR(255), 
1175
  PRIMARY KEY ("commConcept_ID")
1176
);
1177

  
1178
--
1179
-- Table structure for table 'party'
1180
--
1181

  
1182
DROP TABLE IF EXISTS "party";
1183

  
1184
CREATE TABLE "party" (
1185
  "PARTY_ID" SERIAL NOT NULL, 
1186
  "salutation" VARCHAR(20), 
1187
  "givenName" VARCHAR(50), 
1188
  "middleName" VARCHAR(50), 
1189
  "surName" VARCHAR(50), 
1190
  "suffix" VARCHAR(50), 
1191
  "entry_userInitials" VARCHAR(50), 
1192
  "organizationName" VARCHAR(100), 
1193
  "currentName_ID" INTEGER, 
1194
  "contactInstructions" TEXT, 
1195
  "email" VARCHAR(120), 
1196
  "accessionCode" VARCHAR(100), 
1197
  "partyType" VARCHAR(40), 
1198
  "dba_src_ID" INTEGER, 
1199
  "dba_unsure" VARCHAR(255), 
1200
  PRIMARY KEY ("PARTY_ID")
1201
);
1202

  
1203
--
1204
-- Table structure for table 'partyMember'
1205
--
1206

  
1207
DROP TABLE IF EXISTS "partyMember";
1208

  
1209
CREATE TABLE "partyMember" (
1210
  "partyMember_ID" SERIAL NOT NULL, 
1211
  "parentParty_ID" INTEGER NOT NULL, 
1212
  "childParty_ID" INTEGER NOT NULL, 
1213
  "role_ID" INTEGER, 
1214
  "memberStart" TIMESTAMP NOT NULL, 
1215
  "memberStop" TIMESTAMP, 
1216
  "dba_src_ID" INTEGER, 
1217
  PRIMARY KEY ("partyMember_ID")
1218
);
1219

  
1220
--
1221
-- Table structure for table 'place'
1222
--
1223

  
1224
DROP TABLE IF EXISTS "place";
1225

  
1226
CREATE TABLE "place" (
1227
  "PLOTPLACE_ID" SERIAL NOT NULL, 
1228
  "PLOT_ID" INTEGER NOT NULL, 
1229
  "calculated" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1230
  "NAMEDPLACE_ID" INTEGER NOT NULL, 
1231
  "dba_src_ID" INTEGER, 
1232
  PRIMARY KEY ("PLOTPLACE_ID")
1233
);
1234

  
1235
--
1236
-- Table structure for table 'plantConcept'
1237
--
1238

  
1239
DROP TABLE IF EXISTS "plantConcept";
1240

  
1241
CREATE TABLE "plantConcept" (
1242
  "PLANTCONCEPT_ID" SERIAL NOT NULL, 
1243
  "PLANTNAME_ID" INTEGER NOT NULL, 
1244
  "reference_ID" INTEGER NOT NULL, 
1245
  "plantname" VARCHAR(255), 
1246
  "plantNameWithAuthority" VARCHAR(255), 
1247
  "plantCode" VARCHAR(23), 
1248
  "plantDescription" TEXT, 
1249
  "accessionCode" VARCHAR(255), 
1250
  "dba_src_ID" INTEGER, 
1251
  "entry_sppID" INTEGER, 
1252
  "USDAPlantsCode" VARCHAR(255), 
1253
  "VascularPlant" VARCHAR(255), 
1254
  "denorm_kingdom" VARCHAR(255), 
1255
  "denorm_division" VARCHAR(255), 
1256
  "denorm_category" VARCHAR(255), 
1257
  "denorm_family" VARCHAR(255), 
1258
  "denorm_genus" VARCHAR(255), 
1259
  "denorm_species" VARCHAR(255), 
1260
  "denorm_triAbbr" VARCHAR(50), 
1261
  "denorm_triName" VARCHAR(255), 
1262
  "denorm_quadAbbr" VARCHAR(50), 
1263
  "denorm_quadName" VARCHAR(255), 
1264
  "denorm_hybridX" VARCHAR(50), 
1265
  "taxonLevel" VARCHAR(255), 
1266
  "taxonRank" DOUBLE PRECISION NULL, 
1267
  "lowestParentName" VARCHAR(255), 
1268
  "lowestParentConcept_ID" INTEGER, 
1269
  "lowestChildRank" DOUBLE PRECISION NULL, 
1270
  "commonName" VARCHAR(255), 
1271
  "growthForm_short" VARCHAR(255), 
1272
  "woody" VARCHAR(255), 
1273
  "exotic" VARCHAR(255), 
1274
  "usda_code" VARCHAR(255), 
1275
  "usda_growthForm" VARCHAR(255), 
1276
  "sensitiveSpeciesFuzzPlot" INTEGER, 
1277
  PRIMARY KEY ("PLANTCONCEPT_ID")
1278
);
1279

  
1280
--
1281
-- Table structure for table 'plantCorrelation'
1282
--
1283

  
1284
DROP TABLE IF EXISTS "plantCorrelation";
1285

  
1286
CREATE TABLE "plantCorrelation" (
1287
  "PLANTCORRELATION_ID" SERIAL NOT NULL, 
1288
  "PLANTSTATUS_ID" INTEGER NOT NULL, 
1289
  "PLANTCONCEPT_ID" INTEGER NOT NULL, 
1290
  "plantConvergence" VARCHAR(20) NOT NULL, 
1291
  "correlationStart" TIMESTAMP NOT NULL, 
1292
  "correlationStop" TIMESTAMP, 
1293
  "dba_src_ID" INTEGER, 
1294
  PRIMARY KEY ("PLANTCORRELATION_ID")
1295
);
1296

  
1297
--
1298
-- Table structure for table 'plantLineage'
1299
--
1300

  
1301
DROP TABLE IF EXISTS "plantLineage";
1302

  
1303
CREATE TABLE "plantLineage" (
1304
  "PLANTLINEAGE_ID" SERIAL NOT NULL, 
1305
  "childPlantStatus_ID" INTEGER NOT NULL, 
1306
  "parentPlantStatus_ID" INTEGER NOT NULL, 
1307
  "dba_src_ID" INTEGER, 
1308
  PRIMARY KEY ("PLANTLINEAGE_ID")
1309
);
1310

  
1311
--
1312
-- Table structure for table 'plantName'
1313
--
1314

  
1315
DROP TABLE IF EXISTS "plantName";
1316

  
1317
CREATE TABLE "plantName" (
1318
  "PLANTNAME_ID" SERIAL NOT NULL, 
1319
  "plantName" VARCHAR(255) NOT NULL, 
1320
  "reference_ID" INTEGER, 
1321
  "dateEntered" TIMESTAMP DEFAULT E'=Now()', 
1322
  "dba_src_ID" INTEGER, 
1323
  PRIMARY KEY ("PLANTNAME_ID")
1324
);
1325

  
1326
--
1327
-- Table structure for table 'plantStatus'
1328
--
1329

  
1330
DROP TABLE IF EXISTS "plantStatus";
1331

  
1332
CREATE TABLE "plantStatus" (
1333
  "PLANTSTATUS_ID" SERIAL NOT NULL, 
1334
  "PLANTCONCEPT_ID" INTEGER NOT NULL, 
1335
  "reference_ID" INTEGER, 
1336
  "plantConceptStatus" VARCHAR(20) NOT NULL, 
1337
  "startDate" TIMESTAMP NOT NULL, 
1338
  "stopDate" TIMESTAMP, 
1339
  "plantPartyComments" TEXT, 
1340
  "plantParentName" VARCHAR(200), 
1341
  "plantParentConcept_id" INTEGER, 
1342
  "plantParent_ID" INTEGER, 
1343
  "plantLevel" VARCHAR(80), 
1344
  "PARTY_ID" INTEGER NOT NULL, 
1345
  "dba_src_ID" INTEGER, 
1346
  "denorm_FamilyName" VARCHAR(80), 
1347
  "accessionCode" VARCHAR(100), 
1348
  PRIMARY KEY ("PLANTSTATUS_ID")
1349
);
1350

  
1351
--
1352
-- Table structure for table 'plantUsage'
1353
--
1354

  
1355
DROP TABLE IF EXISTS "plantUsage";
1356

  
1357
CREATE TABLE "plantUsage" (
1358
  "PLANTUSAGE_ID" SERIAL NOT NULL, 
1359
  "PLANTNAME_ID" INTEGER NOT NULL, 
1360
  "PLANTCONCEPT_ID" INTEGER NOT NULL, 
1361
  "usageStart" TIMESTAMP, 
1362
  "usageStop" TIMESTAMP, 
1363
  "plantNameStatus" VARCHAR(20), 
1364
  "plantName" VARCHAR(220), 
1365
  "classSystem" VARCHAR(50), 
1366
  "acceptedSynonym" VARCHAR(220), 
1367
  "PARTY_ID" INTEGER NOT NULL, 
1368
  "PLANTSTATUS_ID" INTEGER, 
1369
  "dba_src_ID" INTEGER, 
1370
  PRIMARY KEY ("PLANTUSAGE_ID")
1371
);
1372

  
1373
--
1374
-- Table structure for table 'plot'
1375
--
1376

  
1377
DROP TABLE IF EXISTS "plot";
1378

  
1379
CREATE TABLE "plot" (
1380
  "PLOT_ID" SERIAL NOT NULL, 
1381
  "authorPlotCode" VARCHAR(255) NOT NULL, 
1382
  "reference_ID" INTEGER, 
1383
  "PARENT_ID" INTEGER, 
1384
  "plotObsolete" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1385
  "REPLACEMENTPLOT_ID" INTEGER, 
1386
  "realLatitude" DOUBLE PRECISION NULL, 
1387
  "realLongitude" DOUBLE PRECISION NULL, 
1388
  "locationAccuracy" DOUBLE PRECISION NULL, 
1389
  "confidentialityStatus" INTEGER, 
1390
  "confidentialityFieldsBlocked" INTEGER, 
1391
  "confidentialityReason" VARCHAR(200), 
1392
  "latitude" DOUBLE PRECISION NULL, 
1393
  "longitude" DOUBLE PRECISION NULL, 
1394
  "authorCoordinateType" VARCHAR(100), 
1395
  "authorCoordinateUnits" VARCHAR(100), 
1396
  "authorE" VARCHAR(20), 
1397
  "authorN" VARCHAR(20), 
1398
  "authorZone" VARCHAR(20), 
1399
  "authorDatum" VARCHAR(20), 
1400
  "authorLocation" VARCHAR(200), 
1401
  "locationNarrative" TEXT, 
1402
  "plotRationaleNarrative" TEXT, 
1403
  "azimuth" DOUBLE PRECISION NULL, 
1404
  "dsgpoly" TEXT, 
1405
  "shape" VARCHAR(50), 
1406
  "area" DOUBLE PRECISION NULL, 
1407
  "standSize" VARCHAR(50), 
1408
  "placementMethod" VARCHAR(50), 
1409
  "permanence" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1410
  "layoutNarrative" TEXT, 
1411
  "elevation" DOUBLE PRECISION NULL, 
1412
  "elevationAccuracy" DOUBLE PRECISION NULL, 
1413
  "elevationRange" DOUBLE PRECISION NULL, 
1414
  "slopeAspect" DOUBLE PRECISION NULL, 
1415
  "minSlopeAspect" DOUBLE PRECISION NULL, 
1416
  "maxSlopeAspect" DOUBLE PRECISION NULL, 
1417
  "slopeGradient" DOUBLE PRECISION NULL, 
1418
  "minSlopeGradient" DOUBLE PRECISION NULL, 
1419
  "maxSlopeGradient" DOUBLE PRECISION NULL, 
1420
  "topoPosition" VARCHAR(255), 
1421
  "landform" VARCHAR(255), 
1422
  "surficialDeposits" VARCHAR(255), 
1423
  "rockType" VARCHAR(255), 
1424
  "county" VARCHAR(255), 
1425
  "cust_cvs_province" VARCHAR(255), 
1426
  "stateProvince" VARCHAR(55), 
1427
  "COUNTRY" VARCHAR(100), 
1428
  "dateentered" TIMESTAMP, 
1429
  "submitter_surname" VARCHAR(100), 
1430
  "submitter_givenname" VARCHAR(100), 
1431
  "submitter_email" VARCHAR(100), 
1432
  "accessionCode" VARCHAR(100), 
1433
  "notesPublic" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1434
  "notesMgt" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1435
  "revisions" /*BOOLEAN*/INTEGER DEFAULT E'0', 
1436
  "cust_eep_reach" VARCHAR(255), 
1437
  "dba_src_ID" INTEGER, 
1438
  UNIQUE ("authorPlotCode"), 
1439
  PRIMARY KEY ("PLOT_ID")
1440
);
1441

  
1442
--
1443
-- Table structure for table 'project'
1444
--
1445

  
1446
DROP TABLE IF EXISTS "project";
1447

  
1448
CREATE TABLE "project" (
1449
  "PROJECT_ID" SERIAL NOT NULL, 
1450
  "projectName" VARCHAR(150) NOT NULL, 
1451
  "projectDescription" TEXT, 
1452
  "startDate" TIMESTAMP, 
1453
  "stopDate" TIMESTAMP, 
1454
  "accessionCode" VARCHAR(100), 
1455
  "dba_src_ID" INTEGER, 
1456
  "entry_projectCode" VARCHAR(10), 
1457
  "entry_projectCodeSource" VARCHAR(50), 
1458
  "entry_contactDetails" TEXT, 
1459
  "entry_eep_length" DOUBLE PRECISION NULL, 
1460
  "entry_eep_width" DOUBLE PRECISION NULL, 
1461
  "entry_eep_area" DOUBLE PRECISION NULL, 
1462
  "entry_eep_requiredPlots" INTEGER, 
1463
  "entry_eep_projectType" INTEGER DEFAULT 1, 
1464
  "entry_riverBasin_np_ID" INTEGER, 
1465
  UNIQUE ("accessionCode"), 
1466
  PRIMARY KEY ("PROJECT_ID"), 
1467
  UNIQUE ("entry_projectCodeSource", "entry_projectCode")
1468
);
1469

  
1470
--
1471
-- Table structure for table 'projectContributor'
1472
--
1473

  
1474
DROP TABLE IF EXISTS "projectContributor";
1475

  
1476
CREATE TABLE "projectContributor" (
1477
  "PROJECTCONTRIBUTOR_ID" SERIAL NOT NULL, 
1478
  "PROJECT_ID" INTEGER NOT NULL, 
1479
  "PARTY_ID" INTEGER NOT NULL, 
1480
  "ROLE_ID" INTEGER, 
1481
  "surname" VARCHAR(50), 
1482
  "cheatRole" VARCHAR(50), 
1483
  "dba_src_ID" INTEGER, 
1484
  PRIMARY KEY ("PROJECTCONTRIBUTOR_ID")
1485
);
1486

  
1487
--
1488
-- Table structure for table 'reference'
1489
--
1490

  
1491
DROP TABLE IF EXISTS "reference";
1492

  
1493
CREATE TABLE "reference" (
1494
  "reference_ID" SERIAL NOT NULL, 
1495
  "shortName" VARCHAR(250), 
1496
  "fulltext" TEXT, 
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff