Project

General

Profile

1
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
2
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
3
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
4

    
5
CREATE SCHEMA IF NOT EXISTS `default_schema` ;
6
USE `default_schema` ;
7

    
8
-- -----------------------------------------------------
9
-- Table `default_schema`.`bien_genus_family`
10
-- -----------------------------------------------------
11
CREATE  TABLE IF NOT EXISTS `default_schema`.`bien_genus_family` (
12
  `family` VARCHAR(250) CHARACTER SET 'utf8' NOT NULL ,
13
  `genus` VARCHAR(150) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
14
  `tot_families` INT(1) NULL DEFAULT NULL ,
15
  INDEX `genus` (`genus` ASC) ,
16
  INDEX `family` (`family` ASC) ,
17
  INDEX `tot_families` (`tot_families` ASC) )
18
ENGINE = InnoDB
19
DEFAULT CHARACTER SET = latin1;
20

    
21

    
22
-- -----------------------------------------------------
23
-- Table `default_schema`.`clade`
24
-- -----------------------------------------------------
25
CREATE  TABLE IF NOT EXISTS `default_schema`.`clade` (
26
  `cladeID` INT(11) UNSIGNED NOT NULL ,
27
  `parentCladeID` INT(11) UNSIGNED NULL DEFAULT NULL ,
28
  `cladeNameStd` VARCHAR(250) NOT NULL ,
29
  `rank` VARCHAR(50) NULL DEFAULT NULL ,
30
  `isHybrid` INT(1) UNSIGNED NOT NULL ,
31
  `family` VARCHAR(100) NULL DEFAULT NULL ,
32
  `leftIndex` INT(11) UNSIGNED NULL DEFAULT NULL ,
33
  `rightIndex` INT(11) UNSIGNED NULL DEFAULT NULL ,
34
  `source` VARCHAR(25) NULL DEFAULT NULL ,
35
  `majorPlantGroup` VARCHAR(45) NULL DEFAULT NULL ,
36
  `embryophytes` VARCHAR(45) NULL DEFAULT NULL ,
37
  `vascularPlants` VARCHAR(45) NULL DEFAULT NULL ,
38
  `seedPlants` VARCHAR(45) NULL DEFAULT NULL ,
39
  `floweringPlants` VARCHAR(45) NULL DEFAULT NULL ,
40
  PRIMARY KEY USING BTREE (`cladeID`) ,
41
  INDEX `nameStaging_isHybrid` (`isHybrid` ASC) ,
42
  INDEX `nameStaging_family` (`family` ASC) ,
43
  INDEX `nameStaging_leftIndex` (`leftIndex` ASC) ,
44
  INDEX `nameStaging_rightIndex` (`rightIndex` ASC) ,
45
  INDEX `idx_source` (`source` ASC) ,
46
  INDEX `nameStaging_rank` USING BTREE (`rank` ASC) ,
47
  INDEX `Index_majorPlantGroup` USING BTREE (`majorPlantGroup` ASC) ,
48
  INDEX `Index_embryophytes` USING BTREE (`embryophytes` ASC) ,
49
  INDEX `Index_seedPlants` USING BTREE (`seedPlants` ASC) ,
50
  INDEX `Index_vascularPlants` USING BTREE (`vascularPlants` ASC) ,
51
  INDEX `Index_floweringPlants` USING BTREE (`floweringPlants` ASC) ,
52
  INDEX `nameStaging_parentCladeID` USING BTREE (`parentCladeID` ASC) ,
53
  INDEX `nameStaging_cladeNameStd` USING BTREE (`cladeNameStd` ASC) )
54
ENGINE = InnoDB
55
DEFAULT CHARACTER SET = utf8;
56

    
57

    
58
-- -----------------------------------------------------
59
-- Table `default_schema`.`cladeName`
60
-- -----------------------------------------------------
61
CREATE  TABLE IF NOT EXISTS `default_schema`.`cladeName` (
62
  `cladeNameID` INT(11) NOT NULL AUTO_INCREMENT ,
63
  `cladeID` INT(10) UNSIGNED NOT NULL ,
64
  `cladeName` VARCHAR(250) NOT NULL ,
65
  `cladeNameUnique` VARCHAR(300) NULL DEFAULT NULL ,
66
  `nameStatus` VARCHAR(50) NULL DEFAULT NULL ,
67
  `source` VARCHAR(45) NULL DEFAULT NULL ,
68
  PRIMARY KEY USING BTREE (`cladeNameID`) ,
69
  INDEX `idx_cladeID` USING BTREE (`cladeID` ASC) ,
70
  INDEX `Index_source` (`source` ASC) ,
71
  INDEX `idx_name` USING BTREE (`cladeName` ASC) ,
72
  INDEX `idx_nameStatus` USING BTREE (`nameStatus` ASC) ,
73
  CONSTRAINT `cladeName_ibfk_1`
74
    FOREIGN KEY (`cladeID` )
75
    REFERENCES `default_schema`.`clade` (`cladeID` )
76
    ON DELETE CASCADE
77
    ON UPDATE CASCADE)
78
ENGINE = InnoDB
79
DEFAULT CHARACTER SET = utf8;
80

    
81

    
82
-- -----------------------------------------------------
83
-- Table `default_schema`.`DataSource`
84
-- -----------------------------------------------------
85
CREATE  TABLE IF NOT EXISTS `default_schema`.`DataSource` (
86
  `DataSourceID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
87
  `DataSourceName` VARCHAR(255) NOT NULL ,
88
  `DataSourceType` VARCHAR(255) NOT NULL ,
89
  PRIMARY KEY (`DataSourceID`) ,
90
  INDEX `DataSourceName` (`DataSourceName` ASC) ,
91
  INDEX `DataSourceType` (`DataSourceType` ASC) )
92
ENGINE = InnoDB
93
DEFAULT CHARACTER SET = utf8, 
94
COMMENT = 'Data sources for plots or specimens' ;
95

    
96

    
97
-- -----------------------------------------------------
98
-- Table `default_schema`.`PlotMetaDataDimension`
99
-- -----------------------------------------------------
100
CREATE  TABLE IF NOT EXISTS `default_schema`.`PlotMetaDataDimension` (
101
  `DBPlotID` INT(11) NOT NULL AUTO_INCREMENT ,
102
  `DBSourceName` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
103
  `ContactName` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
104
  `ContactEmail` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
105
  `ContactTelephone` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
106
  `Continent` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
107
  `Country` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
108
  `StateProvince` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
109
  `verbatimCountry` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
110
  `County` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
111
  `Locality` VARCHAR(256) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
112
  `VegetationCategory` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
113
  `PlotCD` BIGINT(32) NULL DEFAULT NULL ,
114
  `PlotName` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
115
  `PlotCensusMethod` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
116
  `PlotArea` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
117
  `PlotAreaUnits` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
118
  `PlotShape` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
119
  `PlotDecimalLatitude` DECIMAL(10,5) NULL DEFAULT NULL ,
120
  `PlotDecimalLongitude` DECIMAL(10,5) NULL DEFAULT NULL ,
121
  `CoordinateUncertainty` DECIMAL(10,5) NULL DEFAULT NULL ,
122
  `CoordinateUncertaintyUnits` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
123
  `PlotReferenceX` DECIMAL(10,5) NULL DEFAULT NULL ,
124
  `PlotReferenceY` DECIMAL(10,5) NULL DEFAULT NULL ,
125
  `PlotMaxDBH` DECIMAL(10,5) NULL DEFAULT NULL ,
126
  `PlotMinDBH` DECIMAL(10,5) NULL DEFAULT NULL ,
127
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
128
  PRIMARY KEY (`DBPlotID`) ,
129
  INDEX `DBSourceName` (`DBSourceName` ASC) ,
130
  INDEX `PlotName_2` (`PlotName` ASC, `DBSourceName` ASC) )
131
ENGINE = InnoDB
132
DEFAULT CHARACTER SET = utf8
133
COLLATE = utf8_bin;
134

    
135

    
136
-- -----------------------------------------------------
137
-- Table `default_schema`.`geoIndividualObservation`
138
-- -----------------------------------------------------
139
CREATE  TABLE IF NOT EXISTS `default_schema`.`geoIndividualObservation` (
140
  `ID` INT(11) NOT NULL COMMENT 'Links 1:1 with DBPlotID' ,
141
  `countryISO` VARCHAR(25) NULL DEFAULT NULL ,
142
  `countryStd` VARCHAR(150) NULL DEFAULT NULL ,
143
  `isInCountry` INT(1) NULL DEFAULT NULL ,
144
  `countryDistError` DOUBLE NULL DEFAULT NULL ,
145
  `stateProvinceStd` VARCHAR(150) NULL DEFAULT NULL ,
146
  `isInStateProvince` INT(1) NULL DEFAULT NULL ,
147
  `stateProvinceDistError` DOUBLE NULL DEFAULT NULL ,
148
  `countyParishStd` VARCHAR(150) NULL DEFAULT NULL ,
149
  `isInCountyParish` INT(1) NULL DEFAULT NULL ,
150
  `countyParishDistError` DOUBLE NULL DEFAULT NULL ,
151
  `isValidLatLong` INT(1) NULL DEFAULT NULL ,
152
  `isCultivated` INT(1) NULL DEFAULT '0' ,
153
  `isCultivatedReason` VARCHAR(255) NULL DEFAULT NULL ,
154
  PRIMARY KEY (`ID`) ,
155
  INDEX `geoI_countryISO_NDX` (`countryISO` ASC) ,
156
  INDEX `geoI_countryStd_NDX` (`countryStd` ASC) ,
157
  INDEX `geoI_isInCountry_NDX` (`isInCountry` ASC) ,
158
  INDEX `geoI_countryDistError_NDX` (`countryDistError` ASC) ,
159
  INDEX `geoI_stateProvinceStd_NDX` (`stateProvinceStd` ASC) ,
160
  INDEX `geoI_isInStateProvince_NDX` (`isInStateProvince` ASC) ,
161
  INDEX `geoI_stateProvinceDistError_NDX` (`stateProvinceDistError` ASC) ,
162
  INDEX `geoI_countyParishStd_NDX` (`countyParishStd` ASC) ,
163
  INDEX `geoI_isInCountyParish_NDX` (`isInCountyParish` ASC) ,
164
  INDEX `geoI_countyParishDistError_NDX` (`countyParishDistError` ASC) ,
165
  INDEX `geoI_isValidLatLong_NDX` (`isValidLatLong` ASC) ,
166
  INDEX `geoI_isCultivated` (`isCultivated` ASC) ,
167
  INDEX `geoI_isCultivatedReason` (`isCultivatedReason` ASC) ,
168
  CONSTRAINT `geoindividualobservation_ibfk_1`
169
    FOREIGN KEY (`ID` )
170
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
171
    ON DELETE CASCADE
172
    ON UPDATE CASCADE)
173
ENGINE = InnoDB
174
DEFAULT CHARACTER SET = utf8;
175

    
176

    
177
-- -----------------------------------------------------
178
-- Table `default_schema`.`geoPlotMetaDataDimension`
179
-- -----------------------------------------------------
180
CREATE  TABLE IF NOT EXISTS `default_schema`.`geoPlotMetaDataDimension` (
181
  `ID` INT(11) NOT NULL COMMENT 'Links 1:1 with DBPlotID' ,
182
  `countryISO` VARCHAR(25) NULL DEFAULT NULL ,
183
  `countryStd` VARCHAR(150) NULL DEFAULT NULL ,
184
  `isInCountry` INT(1) NULL DEFAULT NULL ,
185
  `countryDistError` DOUBLE NULL DEFAULT NULL ,
186
  `stateProvinceStd` VARCHAR(150) NULL DEFAULT NULL ,
187
  `isInStateProvince` INT(1) NULL DEFAULT NULL ,
188
  `stateProvinceDistError` DOUBLE NULL DEFAULT NULL ,
189
  `countyParishStd` VARCHAR(150) NULL DEFAULT NULL ,
190
  `isInCountyParish` INT(1) NULL DEFAULT NULL ,
191
  `countyParishDistError` DOUBLE NULL DEFAULT NULL ,
192
  `isValidLatLong` INT(1) NULL DEFAULT NULL ,
193
  `isCultivated` INT(1) NULL DEFAULT '0' ,
194
  `isCultivatedReason` VARCHAR(255) NULL DEFAULT NULL ,
195
  PRIMARY KEY (`ID`) ,
196
  INDEX `geoP_countryISO_NDX` (`countryISO` ASC) ,
197
  INDEX `geoP_countryStd_NDX` (`countryStd` ASC) ,
198
  INDEX `geoP_isInCountry_NDX` (`isInCountry` ASC) ,
199
  INDEX `geoP_countryDistError_NDX` (`countryDistError` ASC) ,
200
  INDEX `geoP_stateProvinceStd_NDX` (`stateProvinceStd` ASC) ,
201
  INDEX `geoP_isInStateProvince_NDX` (`isInStateProvince` ASC) ,
202
  INDEX `geoP_stateProvinceDistError_NDX` (`stateProvinceDistError` ASC) ,
203
  INDEX `geoP_countyParishStd_NDX` (`countyParishStd` ASC) ,
204
  INDEX `geoP_isInCountyParish_NDX` (`isInCountyParish` ASC) ,
205
  INDEX `geoP_countyParishDistError_NDX` (`countyParishDistError` ASC) ,
206
  INDEX `geoP_isValidLatLong_NDX` (`isValidLatLong` ASC) ,
207
  INDEX `geoP_isCultivated` (`isCultivated` ASC) ,
208
  INDEX `geo_isCultivatedReason` (`isCultivatedReason` ASC) ,
209
  CONSTRAINT `geoplotmetadatadimension_ibfk_1`
210
    FOREIGN KEY (`ID` )
211
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
212
    ON DELETE CASCADE
213
    ON UPDATE CASCADE)
214
ENGINE = InnoDB
215
DEFAULT CHARACTER SET = utf8;
216

    
217

    
218
-- -----------------------------------------------------
219
-- Table `default_schema`.`TaxonDimension`
220
-- -----------------------------------------------------
221
CREATE  TABLE IF NOT EXISTS `default_schema`.`TaxonDimension` (
222
  `TaxonomyID` INT(11) NOT NULL AUTO_INCREMENT ,
223
  `FamilyName` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
224
  `GenusName` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
225
  `SpecificEpithet` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
226
  `InfraspecificEpithet` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
227
  `InfraspecificRank` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
228
  `Authority` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
229
  `is_plotName` INT(1) UNSIGNED NULL DEFAULT '0' ,
230
  `taxonAuthorityVerbatim` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
231
  `taxonMatched` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
232
  `taxonMatchedAuthority` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
233
  `unmatchedTerms` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
234
  `matchScore` DECIMAL(3,2) NULL DEFAULT NULL ,
235
  `taxonMatchedAcceptance` VARCHAR(1) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
236
  `familyCorrected` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
237
  `genusCorrected` VARCHAR(150) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
238
  `speciesCorrected` VARCHAR(255) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
239
  `taxonCorrected` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
240
  `authorityCorrected` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
241
  `taxonCorrectedTnrsID` INT(10) UNSIGNED NULL DEFAULT NULL ,
242
  `taxonCorrectedRank` VARCHAR(25) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
243
  `taxonCorrectedAcceptance` VARCHAR(1) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
244
  `morphospecies` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
245
  `taxonMorphospecies` VARCHAR(250) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
246
  `is_scrubbed` INT(1) UNSIGNED NOT NULL DEFAULT '0' ,
247
  PRIMARY KEY (`TaxonomyID`) ,
248
  INDEX `FamilyName` (`FamilyName` ASC) ,
249
  INDEX `GenusName` (`GenusName` ASC) ,
250
  INDEX `SpecificEpithet` (`SpecificEpithet` ASC) ,
251
  INDEX `InfraspecificRank` (`InfraspecificRank` ASC) ,
252
  INDEX `FamilyName_2` (`FamilyName` ASC, `GenusName` ASC, `SpecificEpithet` ASC, `InfraspecificEpithet` ASC, `InfraspecificRank` ASC, `Authority` ASC) ,
253
  INDEX `InfraspecificEpithet` (`InfraspecificEpithet` ASC) ,
254
  INDEX `taxonAuthorityVerbatim` (`taxonAuthorityVerbatim` ASC) ,
255
  INDEX `taxonCorrected` (`taxonCorrected` ASC) ,
256
  INDEX `taxonMorphospecies` (`taxonMorphospecies` ASC) ,
257
  INDEX `is_scrubbed` (`is_scrubbed` ASC) ,
258
  INDEX `TD_familyCorrected` (`familyCorrected` ASC) ,
259
  INDEX `TD_taxonMatchedAcceptance` (`taxonMatchedAcceptance` ASC) ,
260
  INDEX `TD_taxonCorrectedAcceptance` (`taxonCorrectedAcceptance` ASC) ,
261
  INDEX `TD_taxonCorrectedRank` (`taxonCorrectedRank` ASC) ,
262
  INDEX `taxonCorrectedTnrsID` (`taxonCorrectedTnrsID` ASC) ,
263
  INDEX `TD_is_plotName` (`is_plotName` ASC) ,
264
  INDEX `genusCorrected_idx` (`genusCorrected` ASC) ,
265
  INDEX `speciesCorrected` (`speciesCorrected` ASC) )
266
ENGINE = InnoDB
267
DEFAULT CHARACTER SET = utf8
268
COLLATE = utf8_bin
269
ROW_FORMAT = FIXED;
270

    
271

    
272
-- -----------------------------------------------------
273
-- Table `default_schema`.`SpecimenSourceData`
274
-- -----------------------------------------------------
275
CREATE  TABLE IF NOT EXISTS `default_schema`.`SpecimenSourceData` (
276
  `DBSourceID` INT(11) NOT NULL AUTO_INCREMENT ,
277
  `DBSourceName` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
278
  `ContactName` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
279
  `ContactEmail` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
280
  `ContactTelephone` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
281
  `SpecimenInstitutionCD` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
282
  `SpecimenCollectionCD` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
283
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
284
  PRIMARY KEY (`DBSourceID`) ,
285
  INDEX `DBSourceName` (`DBSourceName` ASC) ,
286
  INDEX `SpecimenInstitutionCD` (`SpecimenInstitutionCD` ASC, `SpecimenCollectionCD` ASC, `DBSourceName` ASC) )
287
ENGINE = InnoDB
288
DEFAULT CHARACTER SET = utf8
289
COLLATE = utf8_bin;
290

    
291

    
292
-- -----------------------------------------------------
293
-- Table `default_schema`.`ObservationSpecimen`
294
-- -----------------------------------------------------
295
CREATE  TABLE IF NOT EXISTS `default_schema`.`ObservationSpecimen` (
296
  `ObservationSpecimenID` INT(11) NOT NULL AUTO_INCREMENT ,
297
  `DBSourceID` INT(11) NOT NULL ,
298
  `Continent` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
299
  `Country` VARCHAR(100) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
300
  `StateProvince` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
301
  `verbatimCountry` VARCHAR(100) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
302
  `County` VARCHAR(100) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
303
  `Locality` VARCHAR(1024) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
304
  `Collector` VARCHAR(256) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
305
  `IdentifiedBy` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
306
  `IdentifiedDate` DATE NULL DEFAULT NULL ,
307
  `CoordinateUncertainty` DECIMAL(10,5) NULL DEFAULT NULL ,
308
  `CoordinateUncertaintyUnits` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
309
  `VegetationCategory` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
310
  `test` TINYINT(3) UNSIGNED NOT NULL ,
311
  `Cultivated` INT(1) NOT NULL ,
312
  `CollectionNumber` VARCHAR(24) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
313
  PRIMARY KEY (`ObservationSpecimenID`) ,
314
  INDEX `RefSpecimenSourceData421` (`DBSourceID` ASC) ,
315
  INDEX `DBSourceID` (`DBSourceID` ASC, `Continent` ASC, `Country` ASC, `StateProvince` ASC, `County` ASC, `Locality`(255) ASC, `Collector`(255) ASC, `IdentifiedBy` ASC, `IdentifiedDate` ASC, `CoordinateUncertainty` ASC, `CoordinateUncertaintyUnits` ASC, `VegetationCategory` ASC) ,
316
  CONSTRAINT `observationspecimen_ibfk_1`
317
    FOREIGN KEY (`DBSourceID` )
318
    REFERENCES `default_schema`.`SpecimenSourceData` (`DBSourceID` )
319
    ON DELETE CASCADE
320
    ON UPDATE CASCADE)
321
ENGINE = InnoDB
322
DEFAULT CHARACTER SET = utf8
323
COLLATE = utf8_bin;
324

    
325

    
326
-- -----------------------------------------------------
327
-- Table `default_schema`.`IndividualObservation`
328
-- -----------------------------------------------------
329
CREATE  TABLE IF NOT EXISTS `default_schema`.`IndividualObservation` (
330
  `ObservationID` INT(11) NOT NULL AUTO_INCREMENT ,
331
  `ObservationType` INT(11) NULL DEFAULT NULL ,
332
  `PlotTreeTag` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
333
  `DBPlotID` INT(11) NULL DEFAULT NULL ,
334
  `SpecimenCatalogNO` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
335
  `ObservationSpecimenID` INT(11) NULL DEFAULT NULL ,
336
  `LatestDateCollected` DATE NULL DEFAULT NULL ,
337
  `DecimalLatitude` DECIMAL(10,5) NULL DEFAULT NULL ,
338
  `DecimalLongitude` DECIMAL(10,5) NULL DEFAULT NULL ,
339
  `NumberOfStems` INT(11) NULL DEFAULT NULL ,
340
  `BasalDiameter` DECIMAL(10,5) NULL DEFAULT NULL ,
341
  `Height` DECIMAL(10,5) NULL DEFAULT NULL ,
342
  `TaxonomyID` INT(11) NOT NULL ,
343
  `RawTreeID` INT(10) NULL DEFAULT NULL ,
344
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
345
  PRIMARY KEY (`ObservationID`) ,
346
  INDEX `RefPlotMetaDataDimension411` (`DBPlotID` ASC) ,
347
  INDEX `RefTaxonDimension381` (`TaxonomyID` ASC) ,
348
  INDEX `ObservationSpecimenID` (`ObservationSpecimenID` ASC) ,
349
  CONSTRAINT `individualobservation_ibfk_3`
350
    FOREIGN KEY (`TaxonomyID` )
351
    REFERENCES `default_schema`.`TaxonDimension` (`TaxonomyID` )
352
    ON DELETE CASCADE
353
    ON UPDATE CASCADE,
354
  CONSTRAINT `individualobservation_ibfk_1`
355
    FOREIGN KEY (`ObservationSpecimenID` )
356
    REFERENCES `default_schema`.`ObservationSpecimen` (`ObservationSpecimenID` )
357
    ON DELETE CASCADE
358
    ON UPDATE CASCADE,
359
  CONSTRAINT `individualobservation_ibfk_2`
360
    FOREIGN KEY (`DBPlotID` )
361
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
362
    ON DELETE CASCADE
363
    ON UPDATE CASCADE)
364
ENGINE = InnoDB
365
DEFAULT CHARACTER SET = utf8
366
COLLATE = utf8_bin;
367

    
368

    
369
-- -----------------------------------------------------
370
-- Table `default_schema`.`IndividualObservationMeasurement`
371
-- -----------------------------------------------------
372
CREATE  TABLE IF NOT EXISTS `default_schema`.`IndividualObservationMeasurement` (
373
  `ObservationID` INT(11) NOT NULL ,
374
  `StemNO` INT(11) NOT NULL AUTO_INCREMENT ,
375
  `ObservationNO` INT(11) NOT NULL ,
376
  `PrimaryStem` INT(11) NULL DEFAULT NULL ,
377
  `DBH` DECIMAL(10,5) NULL DEFAULT NULL ,
378
  `HOM` DECIMAL(10,5) NULL DEFAULT NULL ,
379
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
380
  PRIMARY KEY (`StemNO`) ,
381
  UNIQUE INDEX `ObservationID` (`ObservationID` ASC, `StemNO` ASC, `ObservationNO` ASC) ,
382
  INDEX `RefIndividualObservation11` (`ObservationID` ASC) ,
383
  CONSTRAINT `IndividualObservationMeasurement_ibfk_1`
384
    FOREIGN KEY (`ObservationID` )
385
    REFERENCES `default_schema`.`IndividualObservation` (`ObservationID` )
386
    ON DELETE CASCADE
387
    ON UPDATE CASCADE)
388
ENGINE = InnoDB
389
DEFAULT CHARACTER SET = utf8
390
COLLATE = utf8_bin;
391

    
392

    
393
-- -----------------------------------------------------
394
-- Table `default_schema`.`PlotTimeDimension`
395
-- -----------------------------------------------------
396
CREATE  TABLE IF NOT EXISTS `default_schema`.`PlotTimeDimension` (
397
  `PlotTimeID` INT(11) NOT NULL AUTO_INCREMENT ,
398
  `CensusID` INT(11) NULL DEFAULT NULL ,
399
  `CensusName` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
400
  `CensusStartDate` DATE NULL DEFAULT NULL ,
401
  `CensusEndDate` DATE NULL DEFAULT NULL ,
402
  `DBPlotID` INT(11) NOT NULL ,
403
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
404
  PRIMARY KEY (`PlotTimeID`) ,
405
  INDEX `Ref613` (`DBPlotID` ASC) ,
406
  INDEX `CensusName_2` (`CensusName` ASC, `DBPlotID` ASC, `CensusID` ASC) ,
407
  INDEX `CensusName_5` (`CensusName` ASC, `CensusID` ASC) ,
408
  CONSTRAINT `plottimedimension_ibfk_1`
409
    FOREIGN KEY (`DBPlotID` )
410
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
411
    ON DELETE CASCADE
412
    ON UPDATE CASCADE)
413
ENGINE = InnoDB
414
DEFAULT CHARACTER SET = utf8
415
COLLATE = utf8_bin;
416

    
417

    
418
-- -----------------------------------------------------
419
-- Table `default_schema`.`PlotAggregateFact`
420
-- -----------------------------------------------------
421
CREATE  TABLE IF NOT EXISTS `default_schema`.`PlotAggregateFact` (
422
  `DBPlotID` INT(11) NOT NULL ,
423
  `PlotTimeID` INT(11) NOT NULL ,
424
  `TotalIndividuals` INT(11) NULL DEFAULT NULL ,
425
  `TotalIndividualsAbove1cm` INT(11) NULL DEFAULT NULL ,
426
  `TotalIndividualsAbove2.5cm` INT(11) NULL DEFAULT NULL ,
427
  `TotalIndividualsAbove10cm` INT(11) NULL DEFAULT NULL ,
428
  `PercentCover` DECIMAL(10,5) NULL DEFAULT NULL ,
429
  `TaxonomyID` INT(11) NOT NULL ,
430
  `del` INT(1) UNSIGNED NULL DEFAULT NULL ,
431
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
432
  PRIMARY KEY (`DBPlotID`, `PlotTimeID`, `TaxonomyID`) ,
433
  INDEX `RefPlotMetaDataDimension61` (`DBPlotID` ASC) ,
434
  INDEX `RefPlotTimeDimension371` (`PlotTimeID` ASC) ,
435
  INDEX `RefTaxonDimension181` (`TaxonomyID` ASC) ,
436
  CONSTRAINT `plotaggregatefact_ibfk_3`
437
    FOREIGN KEY (`TaxonomyID` )
438
    REFERENCES `default_schema`.`TaxonDimension` (`TaxonomyID` )
439
    ON DELETE CASCADE
440
    ON UPDATE CASCADE,
441
  CONSTRAINT `plotaggregatefact_ibfk_1`
442
    FOREIGN KEY (`DBPlotID` )
443
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
444
    ON DELETE CASCADE
445
    ON UPDATE CASCADE,
446
  CONSTRAINT `plotaggregatefact_ibfk_2`
447
    FOREIGN KEY (`PlotTimeID` )
448
    REFERENCES `default_schema`.`PlotTimeDimension` (`PlotTimeID` )
449
    ON DELETE CASCADE
450
    ON UPDATE CASCADE)
451
ENGINE = InnoDB
452
DEFAULT CHARACTER SET = utf8
453
COLLATE = utf8_bin;
454

    
455

    
456
-- -----------------------------------------------------
457
-- Table `default_schema`.`TaxonDataSource`
458
-- -----------------------------------------------------
459
CREATE  TABLE IF NOT EXISTS `default_schema`.`TaxonDataSource` (
460
  `TaxonDataSourceID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
461
  `DataSourceID` INT(10) UNSIGNED NOT NULL ,
462
  `TaxonomyID` INT(11) NOT NULL ,
463
  `TotalObservations` INT(10) UNSIGNED NULL DEFAULT NULL ,
464
  `GeoreferencedObservations` INT(10) UNSIGNED NULL DEFAULT NULL ,
465
  PRIMARY KEY (`TaxonDataSourceID`) ,
466
  INDEX `DataSourceID` (`DataSourceID` ASC) ,
467
  INDEX `TaxonomyID` (`TaxonomyID` ASC) ,
468
  CONSTRAINT `TaxonDataSource_ibfk_2`
469
    FOREIGN KEY (`TaxonomyID` )
470
    REFERENCES `default_schema`.`TaxonDimension` (`TaxonomyID` )
471
    ON DELETE CASCADE
472
    ON UPDATE CASCADE,
473
  CONSTRAINT `TaxonDataSource_ibfk_1`
474
    FOREIGN KEY (`DataSourceID` )
475
    REFERENCES `default_schema`.`DataSource` (`DataSourceID` )
476
    ON DELETE CASCADE
477
    ON UPDATE CASCADE)
478
ENGINE = InnoDB
479
DEFAULT CHARACTER SET = utf8, 
480
COMMENT = 'Links taxa to data sources in which they are used' ;
481

    
482

    
483
-- -----------------------------------------------------
484
-- Table `default_schema`.`TaxonObservation`
485
-- -----------------------------------------------------
486
CREATE  TABLE IF NOT EXISTS `default_schema`.`TaxonObservation` (
487
  `TaxonomyObservationID` INT(11) NOT NULL AUTO_INCREMENT ,
488
  `TaxonomyID` INT(11) NULL DEFAULT NULL ,
489
  `PlotOrSpecimenFlag` INT(11) NULL DEFAULT NULL ,
490
  `DBPlotID` INT(11) NOT NULL ,
491
  `DBSourceID` INT(11) NOT NULL ,
492
  `GBIFScientificNameOriginal` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
493
  `GBIFFamilyOriginal` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
494
  `GBIFGenusOriginal` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NULL DEFAULT NULL ,
495
  `test` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' ,
496
  PRIMARY KEY (`TaxonomyObservationID`) ,
497
  INDEX `RefTaxonDimension301` (`TaxonomyID` ASC) ,
498
  INDEX `Ref614` (`DBPlotID` ASC) ,
499
  INDEX `TaxonomyID_2` (`TaxonomyID` ASC, `DBPlotID` ASC) ,
500
  INDEX `DBSourceID` (`DBSourceID` ASC) ,
501
  CONSTRAINT `taxonobservation_ibfk_3`
502
    FOREIGN KEY (`TaxonomyID` )
503
    REFERENCES `default_schema`.`TaxonDimension` (`TaxonomyID` )
504
    ON DELETE CASCADE
505
    ON UPDATE CASCADE,
506
  CONSTRAINT `taxonobservation_ibfk_1`
507
    FOREIGN KEY (`DBPlotID` )
508
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
509
    ON DELETE CASCADE
510
    ON UPDATE CASCADE,
511
  CONSTRAINT `taxonobservation_ibfk_2`
512
    FOREIGN KEY (`DBSourceID` )
513
    REFERENCES `default_schema`.`SpecimenSourceData` (`DBSourceID` )
514
    ON DELETE CASCADE
515
    ON UPDATE CASCADE)
516
ENGINE = InnoDB
517
DEFAULT CHARACTER SET = utf8
518
COLLATE = utf8_bin;
519

    
520

    
521
-- -----------------------------------------------------
522
-- Table `default_schema`.`TraitObservation`
523
-- -----------------------------------------------------
524
CREATE  TABLE IF NOT EXISTS `default_schema`.`TraitObservation` (
525
  `TraitObservationID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
526
  `TaxonomyID` INT(11) NOT NULL ,
527
  `Family` VARCHAR(100) NULL DEFAULT NULL ,
528
  `Genus` VARCHAR(100) NULL DEFAULT NULL ,
529
  `SpecificEpithet` VARCHAR(100) NULL DEFAULT NULL ,
530
  `InfraspecificRank` VARCHAR(25) NULL DEFAULT NULL ,
531
  `InfraspecificEpithet` VARCHAR(100) NULL DEFAULT NULL ,
532
  `Taxon` VARCHAR(255) NULL DEFAULT NULL ,
533
  `AuthorOfScientificName` VARCHAR(255) NULL DEFAULT NULL ,
534
  `TaxonAuthor` VARCHAR(255) NULL DEFAULT NULL ,
535
  `Habit` VARCHAR(50) NULL DEFAULT NULL ,
536
  `TraitName` VARCHAR(200) NULL DEFAULT NULL ,
537
  `TraitValue` VARCHAR(100) NULL DEFAULT NULL ,
538
  `Unit` VARCHAR(100) NULL DEFAULT NULL ,
539
  `Method` VARCHAR(255) NULL DEFAULT NULL ,
540
  `Region` VARCHAR(100) NULL DEFAULT NULL ,
541
  `Country` VARCHAR(100) NULL DEFAULT NULL ,
542
  `StateProvince` VARCHAR(100) NULL DEFAULT NULL ,
543
  `LowerPolitical` VARCHAR(100) NULL DEFAULT NULL ,
544
  `LocalityDescription` VARCHAR(100) NULL DEFAULT NULL ,
545
  `VerbatimLatitude` VARCHAR(150) NULL DEFAULT NULL ,
546
  `VerbatimLongitude` VARCHAR(150) NULL DEFAULT NULL ,
547
  `VerbatimElevation` VARCHAR(150) NULL DEFAULT NULL ,
548
  `Source` VARCHAR(100) NULL DEFAULT NULL ,
549
  `URLSource` VARCHAR(100) NULL DEFAULT NULL ,
550
  `SourceCitation` VARCHAR(1000) NULL DEFAULT NULL ,
551
  `SourceID` VARCHAR(255) NULL DEFAULT NULL ,
552
  `VisitingDate` VARCHAR(100) NULL DEFAULT NULL ,
553
  `ReferenceID` INT(11) UNSIGNED NULL DEFAULT NULL ,
554
  `Access` VARCHAR(100) NULL DEFAULT NULL ,
555
  `Project_PI` VARCHAR(255) NULL DEFAULT NULL ,
556
  `Project_PI_contact` VARCHAR(100) NULL DEFAULT NULL ,
557
  `Observation` VARCHAR(255) NULL DEFAULT NULL ,
558
  `Authorship` VARCHAR(255) NULL DEFAULT NULL ,
559
  `AuthorshipContact` VARCHAR(100) NULL DEFAULT NULL ,
560
  PRIMARY KEY (`TraitObservationID`) ,
561
  INDEX `TaxonomyID` (`TaxonomyID` ASC) ,
562
  INDEX `Family` (`Family` ASC) ,
563
  INDEX `Taxon` (`Taxon` ASC) ,
564
  INDEX `TraitName` (`TraitName` ASC) ,
565
  INDEX `ReferenceID` (`ReferenceID` ASC) ,
566
  INDEX `TaxonAuthor` (`TaxonAuthor` ASC) ,
567
  CONSTRAINT `traitobservation_ibfk_1`
568
    FOREIGN KEY (`TaxonomyID` )
569
    REFERENCES `default_schema`.`TaxonDimension` (`TaxonomyID` )
570
    ON DELETE CASCADE
571
    ON UPDATE CASCADE)
572
ENGINE = InnoDB
573
DEFAULT CHARACTER SET = utf8, 
574
COMMENT = 'Species trait observations' ;
575

    
576

    
577
-- -----------------------------------------------------
578
-- Table `default_schema`.`viewFullOccurrence`
579
-- -----------------------------------------------------
580
CREATE  TABLE IF NOT EXISTS `default_schema`.`viewFullOccurrence` (
581
  `OccurID` INT(11) NOT NULL AUTO_INCREMENT ,
582
  `DBPlotID` INT(11) NOT NULL ,
583
  `ObservationID` INT(11) NULL DEFAULT NULL ,
584
  `Family` VARCHAR(64) NULL DEFAULT NULL ,
585
  `TaxonomyID` INT(11) NOT NULL ,
586
  `OrigGenus` VARCHAR(64) NULL DEFAULT NULL ,
587
  `OrigSpecies` VARCHAR(64) NULL DEFAULT NULL ,
588
  `TaxonCorrected` VARCHAR(250) NULL DEFAULT NULL ,
589
  `Genus` VARCHAR(64) NULL DEFAULT NULL ,
590
  `Species` VARCHAR(64) NULL DEFAULT NULL ,
591
  `Latin` VARCHAR(64) NULL DEFAULT NULL ,
592
  `Rank` VARCHAR(16) NULL DEFAULT NULL ,
593
  `Accepted` VARCHAR(2) NULL DEFAULT NULL ,
594
  `TaxonMorphoSpecies` VARCHAR(255) NULL DEFAULT NULL ,
595
  `isCultivated` INT(1) NULL DEFAULT '0' ,
596
  `isCultivatedReason` VARCHAR(255) NULL DEFAULT NULL ,
597
  `CountryOrig` VARCHAR(100) NULL DEFAULT NULL ,
598
  `CountryStd` VARCHAR(150) NULL DEFAULT NULL ,
599
  `CountryError` DOUBLE NULL DEFAULT NULL ,
600
  `ProvinceStd` VARCHAR(64) NULL DEFAULT NULL ,
601
  `ProvinceError` DOUBLE NULL DEFAULT NULL ,
602
  `County` VARCHAR(64) NULL DEFAULT NULL ,
603
  `Plot` VARCHAR(32) NULL DEFAULT NULL ,
604
  `PlotArea` VARCHAR(10) NULL DEFAULT NULL ,
605
  `Latitude` DECIMAL(10,5) NULL DEFAULT NULL ,
606
  `Longitude` DECIMAL(10,5) NULL DEFAULT NULL ,
607
  `isValidLatLong` INT(1) NULL DEFAULT NULL ,
608
  `Date` DATE NULL DEFAULT NULL ,
609
  `SurveyType` VARCHAR(10) NULL DEFAULT NULL ,
610
  `Abund` INT(11) NULL DEFAULT NULL ,
611
  `Abund1` INT(11) NULL DEFAULT NULL ,
612
  `Abund2.5` INT(11) NULL DEFAULT NULL ,
613
  `Abund10` INT(11) NULL DEFAULT NULL ,
614
  `PctCover` DECIMAL(10,5) NULL DEFAULT NULL ,
615
  `DataSource` VARCHAR(128) NULL DEFAULT NULL ,
616
  PRIMARY KEY (`OccurID`) ,
617
  INDEX `DBPlotID` (`DBPlotID` ASC) ,
618
  INDEX `ObservationID` (`ObservationID` ASC) ,
619
  INDEX `Family` (`Family`(16) ASC) ,
620
  INDEX `TaxonCorrected` (`TaxonCorrected`(25) ASC) ,
621
  INDEX `Latin` (`Latin`(25) ASC) ,
622
  INDEX `TaxonomyID` (`TaxonomyID` ASC) ,
623
  INDEX `Genus` (`Genus`(16) ASC) ,
624
  INDEX `Species` (`Species`(20) ASC) ,
625
  INDEX `ORIGLATIN` (`OrigGenus`(16) ASC, `OrigSpecies`(20) ASC) ,
626
  INDEX `CountryStd` (`CountryStd` ASC) ,
627
  INDEX `SurveyType` (`SurveyType` ASC) ,
628
  INDEX `DataSource` (`DataSource` ASC) ,
629
  INDEX `Rank` (`Rank` ASC) ,
630
  INDEX `Accepted` (`Accepted` ASC) ,
631
  INDEX `isCultivated` (`isCultivated` ASC) ,
632
  INDEX `isCultivatedReason` (`isCultivatedReason` ASC) ,
633
  INDEX `isValidLatLong` (`isValidLatLong` ASC) ,
634
  INDEX `CountryError` (`CountryError` ASC) ,
635
  INDEX `ProvinceError` (`ProvinceError` ASC) ,
636
  CONSTRAINT `viewFullOccurrence_ibfk_1`
637
    FOREIGN KEY (`ObservationID` )
638
    REFERENCES `default_schema`.`IndividualObservation` (`ObservationID` )
639
    ON DELETE CASCADE
640
    ON UPDATE CASCADE,
641
  CONSTRAINT `viewFullOccurrence_ibfk_3`
642
    FOREIGN KEY (`DBPlotID` )
643
    REFERENCES `default_schema`.`PlotMetaDataDimension` (`DBPlotID` )
644
    ON DELETE CASCADE
645
    ON UPDATE CASCADE,
646
  CONSTRAINT `viewFullOccurrence_ibfk_2`
647
    FOREIGN KEY (`TaxonomyID` )
648
    REFERENCES `default_schema`.`TaxonDimension` (`TaxonomyID` )
649
    ON DELETE CASCADE
650
    ON UPDATE CASCADE)
651
ENGINE = InnoDB
652
DEFAULT CHARACTER SET = utf8;
653

    
654

    
655

    
656
SET SQL_MODE=@OLD_SQL_MODE;
657
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
658
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
(4-4/9)