Project

General

Profile

« Previous | Next » 

Revision 8624

schemas/VegCore/VegCore.ERD.mwb: re-synced with VegCore.my.sql: step 2: `DEFAULT NULL` added on all nullable columns

View differences:

schemas/VegCore/VegCore.my.sql
10 10
  `id` VARBINARY(767) NOT NULL ,
11 11
  `parent` VARBINARY(767) NOT NULL ,
12 12
  `name` VARBINARY(767) NOT NULL ,
13
  `first_publisher` VARBINARY(767) NULL ,
14
  `contact` VARBINARY(767) NULL ,
13
  `first_publisher` VARBINARY(767) NULL DEFAULT NULL ,
14
  `contact` VARBINARY(767) NULL DEFAULT NULL ,
15 15
  `info` SET('hstore') NULL ,
16 16
  PRIMARY KEY (`id`) ,
17 17
  INDEX `fk_source1_idx` (`parent` ASC) ,
......
44 44
CREATE  TABLE IF NOT EXISTS `record` (
45 45
  `id` VARBINARY(767) NOT NULL ,
46 46
  `source` VARBINARY(767) NOT NULL ,
47
  `source_record_id` VARBINARY(767) NULL ,
47
  `source_record_id` VARBINARY(767) NULL DEFAULT NULL ,
48 48
  PRIMARY KEY (`id`) ,
49 49
  INDEX `fk_record_source1_idx` (`source` ASC) ,
50 50
  UNIQUE INDEX `record_unique` (`source` ASC, `source_record_id` ASC) ,
......
128 128
CREATE  TABLE IF NOT EXISTS `taxon_assertion` (
129 129
  `id` VARBINARY(767) NOT NULL ,
130 130
  `string` VARBINARY(767) NOT NULL ,
131
  `taxon` VARBINARY(767) NULL ,
132
  `cf_aff` VARBINARY(767) NULL ,
131
  `taxon` VARBINARY(767) NULL DEFAULT NULL ,
132
  `cf_aff` VARBINARY(767) NULL DEFAULT NULL ,
133 133
  `annotations` SET('hstore') NULL ,
134 134
  PRIMARY KEY (`id`) ,
135 135
  INDEX `fk_taxon_assertion_taxon_string1_idx` (`string` ASC) ,
......
159 159
-- -----------------------------------------------------
160 160
CREATE  TABLE IF NOT EXISTS `parsed_taxon_assertion` (
161 161
  `id` VARBINARY(767) NOT NULL ,
162
  `matched_taxon` VARBINARY(767) NULL ,
162
  `matched_taxon` VARBINARY(767) NULL DEFAULT NULL ,
163 163
  `match_score` FLOAT NULL ,
164 164
  `match_info` SET('hstore') NULL ,
165 165
  PRIMARY KEY (`id`) ,
......
184 184
-- -----------------------------------------------------
185 185
CREATE  TABLE IF NOT EXISTS `taxon_string` (
186 186
  `string` VARBINARY(767) NOT NULL ,
187
  `parsed_taxon_assertion` VARBINARY(767) NULL ,
187
  `parsed_taxon_assertion` VARBINARY(767) NULL DEFAULT NULL ,
188 188
  PRIMARY KEY (`string`) ,
189 189
  INDEX `fk_taxon_string_parsed_taxon_assertion1_idx` (`parsed_taxon_assertion` ASC) ,
190 190
  CONSTRAINT `fk_taxon_string_parsed_taxon_assertion1`
......
203 203
CREATE  TABLE IF NOT EXISTS `taxon_name` (
204 204
  `id` VARBINARY(767) NOT NULL ,
205 205
  `unique_name` VARBINARY(767) NOT NULL ,
206
  `formal_name` VARBINARY(767) NULL ,
207
  `taxon_name` VARBINARY(767) NULL ,
208
  `author` VARBINARY(767) NULL ,
209
  `common_name` VARBINARY(767) NULL ,
210
  `rank` VARBINARY(767) NULL ,
206
  `formal_name` VARBINARY(767) NULL DEFAULT NULL ,
207
  `taxon_name` VARBINARY(767) NULL DEFAULT NULL ,
208
  `author` VARBINARY(767) NULL DEFAULT NULL ,
209
  `common_name` VARBINARY(767) NULL DEFAULT NULL ,
210
  `rank` VARBINARY(767) NULL DEFAULT NULL ,
211 211
  PRIMARY KEY (`id`) ,
212 212
  INDEX `fk_taxon_concept_taxon_string10_idx` (`unique_name` ASC) ,
213 213
  CONSTRAINT `fk_taxon_record10`
......
230 230
-- -----------------------------------------------------
231 231
CREATE  TABLE IF NOT EXISTS `coordinates` (
232 232
  `id` VARBINARY(767) NOT NULL ,
233
  `latitude_deg` VARBINARY(767) NULL ,
234
  `longitude_deg` VARBINARY(767) NULL ,
233
  `latitude_deg` VARBINARY(767) NULL DEFAULT NULL ,
234
  `longitude_deg` VARBINARY(767) NULL DEFAULT NULL ,
235 235
  PRIMARY KEY (`id`) )
236 236
ENGINE = InnoDB
237 237
DEFAULT CHARACTER SET = utf8
......
243 243
-- -----------------------------------------------------
244 244
CREATE  TABLE IF NOT EXISTS `place_path` (
245 245
  `id` VARBINARY(767) NOT NULL ,
246
  `continent` VARBINARY(767) NULL ,
247
  `country` VARBINARY(767) NULL ,
248
  `state_province` VARBINARY(767) NULL ,
249
  `county` VARBINARY(767) NULL ,
250
  `municipality` VARBINARY(767) NULL ,
246
  `continent` VARBINARY(767) NULL DEFAULT NULL ,
247
  `country` VARBINARY(767) NULL DEFAULT NULL ,
248
  `state_province` VARBINARY(767) NULL DEFAULT NULL ,
249
  `county` VARBINARY(767) NULL DEFAULT NULL ,
250
  `municipality` VARBINARY(767) NULL DEFAULT NULL ,
251 251
  `ranks` SET('hstore') NULL ,
252 252
  PRIMARY KEY (`id`) )
253 253
ENGINE = InnoDB
......
261 261
CREATE  TABLE IF NOT EXISTS `place` (
262 262
  `id` VARBINARY(767) NOT NULL ,
263 263
  `parent` VARBINARY(767) NOT NULL ,
264
  `coordinates` VARBINARY(767) NULL ,
265
  `path` VARBINARY(767) NULL ,
266
  `locality` VARBINARY(767) NULL ,
264
  `coordinates` VARBINARY(767) NULL DEFAULT NULL ,
265
  `path` VARBINARY(767) NULL DEFAULT NULL ,
266
  `locality` VARBINARY(767) NULL DEFAULT NULL ,
267 267
  PRIMARY KEY (`id`) ,
268 268
  INDEX `fk_place_coordinates1_idx` (`coordinates` ASC) ,
269 269
  INDEX `fk_place1_idx` (`parent` ASC) ,
......
316 316
CREATE  TABLE IF NOT EXISTS `event` (
317 317
  `id` VARBINARY(767) NOT NULL ,
318 318
  `parent` VARBINARY(767) NOT NULL ,
319
  `name` VARBINARY(767) NULL ,
320
  `date_range` VARBINARY(767) NULL ,
321
  `place` VARBINARY(767) NULL ,
322
  `method` VARBINARY(767) NULL ,
319
  `name` VARBINARY(767) NULL DEFAULT NULL ,
320
  `date_range` VARBINARY(767) NULL DEFAULT NULL ,
321
  `place` VARBINARY(767) NULL DEFAULT NULL ,
322
  `method` VARBINARY(767) NULL DEFAULT NULL ,
323 323
  PRIMARY KEY (`id`) ,
324 324
  INDEX `fk_event_place1_idx` (`place` ASC) ,
325 325
  INDEX `fk_event1_idx` (`parent` ASC) ,
......
371 371
-- -----------------------------------------------------
372 372
CREATE  TABLE IF NOT EXISTS `specimen` (
373 373
  `id` VARBINARY(767) NOT NULL ,
374
  `collection` VARBINARY(767) NULL ,
375
  `stamping_institution` VARBINARY(767) NULL ,
376
  `donor_institution` VARBINARY(767) NULL ,
377
  `owner` VARBINARY(767) NULL ,
378
  `barcode` VARBINARY(767) NULL ,
379
  `accession_number` VARBINARY(767) NULL ,
374
  `collection` VARBINARY(767) NULL DEFAULT NULL ,
375
  `stamping_institution` VARBINARY(767) NULL DEFAULT NULL ,
376
  `donor_institution` VARBINARY(767) NULL DEFAULT NULL ,
377
  `owner` VARBINARY(767) NULL DEFAULT NULL ,
378
  `barcode` VARBINARY(767) NULL DEFAULT NULL ,
379
  `accession_number` VARBINARY(767) NULL DEFAULT NULL ,
380 380
  PRIMARY KEY (`id`) ,
381 381
  INDEX `fk_specimen_collection1_idx` (`collection` ASC) ,
382 382
  INDEX `fk_specimen_organization1_idx` (`stamping_institution` ASC) ,
......
418 418
CREATE  TABLE IF NOT EXISTS `taxon_observation` (
419 419
  `id` VARBINARY(767) NOT NULL ,
420 420
  `taxon_occurrence` VARBINARY(767) NOT NULL ,
421
  `voucher` VARBINARY(767) NULL ,
422
  `growth_form` VARBINARY(767) NULL ,
421
  `voucher` VARBINARY(767) NULL DEFAULT NULL ,
422
  `growth_form` VARBINARY(767) NULL DEFAULT NULL ,
423 423
  `cultivated` TINYINT(1) NULL ,
424 424
  `traits` SET('hstore') NULL ,
425 425
  PRIMARY KEY (`id`) ,
......
451 451
CREATE  TABLE IF NOT EXISTS `taxon_determination` (
452 452
  `id` VARBINARY(767) NOT NULL ,
453 453
  `taxon_assertion` VARBINARY(767) NOT NULL ,
454
  `identified_by` VARBINARY(767) NULL ,
454
  `identified_by` VARBINARY(767) NULL DEFAULT NULL ,
455 455
  `fit_info` SET('hstore') NULL ,
456 456
  INDEX `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion` ASC) ,
457 457
  PRIMARY KEY (`id`) ,
......
482 482
-- -----------------------------------------------------
483 483
CREATE  TABLE IF NOT EXISTS `taxon_occurrence` (
484 484
  `id` VARBINARY(767) NOT NULL ,
485
  `collector` VARBINARY(767) NULL ,
486
  `collection_event` VARBINARY(767) NULL ,
487
  `collector_number` VARBINARY(767) NULL ,
488
  `current_determination` VARBINARY(767) NULL ,
489
  `original_determination` VARBINARY(767) NULL ,
485
  `collector` VARBINARY(767) NULL DEFAULT NULL ,
486
  `collection_event` VARBINARY(767) NULL DEFAULT NULL ,
487
  `collector_number` VARBINARY(767) NULL DEFAULT NULL ,
488
  `current_determination` VARBINARY(767) NULL DEFAULT NULL ,
489
  `original_determination` VARBINARY(767) NULL DEFAULT NULL ,
490 490
  PRIMARY KEY (`id`) ,
491 491
  INDEX `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination` ASC) ,
492 492
  INDEX `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination` ASC) ,
......
527 527
-- -----------------------------------------------------
528 528
CREATE  TABLE IF NOT EXISTS `individual` (
529 529
  `id` VARBINARY(767) NOT NULL ,
530
  `tag` VARBINARY(767) NULL ,
531
  `code` VARBINARY(767) NULL ,
530
  `tag` VARBINARY(767) NULL DEFAULT NULL ,
531
  `code` VARBINARY(767) NULL DEFAULT NULL ,
532 532
  PRIMARY KEY (`id`) ,
533 533
  CONSTRAINT `fk_individual_record1`
534 534
    FOREIGN KEY (`id` )
......
593 593
  `id` VARBINARY(767) NOT NULL ,
594 594
  `according_to` VARBINARY(767) NOT NULL ,
595 595
  `parent` VARBINARY(767) NOT NULL ,
596
  `accepted_taxon` VARBINARY(767) NULL ,
596
  `accepted_taxon` VARBINARY(767) NULL DEFAULT NULL ,
597 597
  PRIMARY KEY (`id`) ,
598 598
  INDEX `fk_taxon_taxon1_idx` (`parent` ASC) ,
599 599
  INDEX `fk_taxon_concept_source1_idx` (`according_to` ASC) ,
......
669 669
  `elevation_m` DOUBLE NULL ,
670 670
  `slope_incline_deg` DOUBLE NULL ,
671 671
  `slope_direction_deg_N` DOUBLE NULL ,
672
  `geological_context` VARBINARY(767) NULL ,
673
  `community` VARBINARY(767) NULL ,
672
  `geological_context` VARBINARY(767) NULL DEFAULT NULL ,
673
  `community` VARBINARY(767) NULL DEFAULT NULL ,
674 674
  `observations` SET('hstore') NULL ,
675 675
  INDEX `fk_place_observation_place1_idx` (`place` ASC) ,
676 676
  INDEX `fk_place_observation_geological_context1_idx` (`geological_context` ASC) ,
......
724 724
-- -----------------------------------------------------
725 725
CREATE  TABLE IF NOT EXISTS `plot` (
726 726
  `id` VARBINARY(767) NOT NULL ,
727
  `name` VARBINARY(767) NULL ,
727
  `name` VARBINARY(767) NULL DEFAULT NULL ,
728 728
  `area_m2` DOUBLE NULL ,
729
  `bounding_box` VARBINARY(767) NULL ,
729
  `bounding_box` VARBINARY(767) NULL DEFAULT NULL ,
730 730
  PRIMARY KEY (`id`) ,
731 731
  CONSTRAINT `fk_subplot_place1`
732 732
    FOREIGN KEY (`id` )
......
1065 1065
-- -----------------------------------------------------
1066 1066
CREATE  TABLE IF NOT EXISTS `taxon_path` (
1067 1067
  `id` VARBINARY(767) NOT NULL ,
1068
  `family` VARBINARY(767) NULL ,
1069
  `genus` VARBINARY(767) NULL ,
1070
  `specific_epithet` VARBINARY(767) NULL ,
1068
  `family` VARBINARY(767) NULL DEFAULT NULL ,
1069
  `genus` VARBINARY(767) NULL DEFAULT NULL ,
1070
  `specific_epithet` VARBINARY(767) NULL DEFAULT NULL ,
1071 1071
  `ranks` SET('hstore') NULL ,
1072 1072
  PRIMARY KEY (`id`) ,
1073 1073
  CONSTRAINT `fk_taxon_path_taxon_name1`

Also available in: Unified diff