Subversion Repositories eFlore/Applications.cel

Rev

Rev 1227 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1178 jpm 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
 
6
-- -----------------------------------------------------
7
-- Table `cel_images`
8
-- -----------------------------------------------------
9
DROP TABLE IF EXISTS `cel_images` ;
10
 
11
CREATE  TABLE IF NOT EXISTS `cel_images` (
12
  `ci_id_image` BIGINT(20) NOT NULL AUTO_INCREMENT ,
13
  `ci_ordre` BIGINT(20) NOT NULL ,
14
  `ci_ce_utilisateur` VARCHAR(60) NOT NULL ,
15
  `ci_publiable_eflore` TINYINT(1) NOT NULL ,
16
  `ci_note_image` TINYINT(5) NOT NULL DEFAULT '-1' ,
17
  `ci_meta_height` INT(11) NOT NULL ,
18
  `ci_meta_width` INT(11) NOT NULL ,
19
  `ci_meta_make` VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
20
  `ci_meta_model` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
21
  `ci_meta_x_resolution` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
22
  `ci_meta_y_resolution` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
23
  `ci_meta_date_time` VARCHAR(30) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
24
  `ci_meta_date` DATE NULL DEFAULT NULL ,
25
  `ci_meta_date_ajout` DATETIME NOT NULL ,
26
  `ci_meta_gps` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
27
  `ci_meta_user_comment` LONGTEXT CHARACTER SET 'ascii' NULL DEFAULT NULL ,
28
  `ci_meta_comment` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
29
  `ci_meta_mots_cles` VARCHAR(800) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
30
  `ci_meta_exif_exposure_time` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
31
  `ci_meta_exif_f_number` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
32
  `ci_meta_exif_exif_version` INT(11) NULL DEFAULT NULL ,
33
  `ci_meta_exif_compressed_bits_per_pixel` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
34
  `ci_meta_exif_shutter_speed_value` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
35
  `ci_meta_exif_aperture_value` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
36
  `ci_meta_exif_exposure_bias_value` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
37
  `ci_meta_exif_max_aperture_value` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
38
  `ci_meta_exif_metering_mode` INT(5) NULL DEFAULT NULL ,
39
  `ci_meta_exif_light_source` VARCHAR(2) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
40
  `ci_meta_exif_flash` INT(5) NULL DEFAULT NULL ,
41
  `ci_meta_exif_focal_length` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
42
  `ci_meta_exif_flash_pix_version` INT(10) NULL DEFAULT NULL ,
43
  `ci_meta_exif_color_space` INT(5) NULL DEFAULT NULL ,
44
  `ci_meta_exif_interoperability_offset` INT(10) NULL DEFAULT NULL ,
45
  `ci_meta_exif_focal_plane_x_resolution` VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
46
  `ci_meta_exif_focal_plane_y_resolution` VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
47
  `ci_meta_exif_focal_plane_resolution_unit` INT(5) NULL DEFAULT NULL ,
48
  `ci_meta_exif_sensing_method` INT(5) NULL DEFAULT NULL ,
49
  `ci_meta_exif_file_source` TEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
50
  `ci_meta_exif_custom_rendered` INT(5) NULL DEFAULT NULL ,
51
  `ci_meta_exif_exposure_mode` INT(5) NULL DEFAULT NULL ,
52
  `ci_meta_exif_white_balance` INT(5) NULL DEFAULT NULL ,
53
  `ci_meta_exif_digital_zoom_ratio` VARCHAR(10) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
54
  `ci_meta_exif_scene_capture_type` INT(5) NULL DEFAULT NULL ,
55
  `ci_meta_exif_gain_control` INT(5) NULL DEFAULT NULL ,
56
  `ci_meta_exif_contrast` INT(5) NULL DEFAULT NULL ,
57
  `ci_meta_exif_saturation` INT(5) NULL DEFAULT NULL ,
58
  `ci_meta_exif_sharpness` INT(5) NULL DEFAULT NULL ,
59
  `ci_meta_exif_subject_distance_range` INT(5) NULL DEFAULT NULL ,
60
  `ci_meta_exif_autres` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
61
  `ci_meta_iptc_category` VARCHAR(200) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
62
  `ci_meta_iptc_mots_cles` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
63
  `ci_meta_iptc_by_line` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
64
  `ci_meta_iptc_by_line_title` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
65
  `ci_meta_iptc_city` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
66
  `ci_meta_iptc_sub_location` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
67
  `ci_meta_iptc_province_state` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
68
  `ci_meta_iptc_country_primary_location_code` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
69
  `ci_meta_iptc_country_name` VARCHAR(200) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
70
  `ci_meta_iptc_headline` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
71
  `ci_meta_iptc_credit` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
72
  `ci_meta_iptc_copyright_notice` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
73
  `ci_meta_iptc_contact` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
74
  `ci_meta_iptc_autres` LONGTEXT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
75
  `ci_nom_original` VARCHAR(255) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
76
  `ci_md5` VARCHAR(32) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ,
77
  PRIMARY KEY (`ci_id_image`) ,
78
  INDEX `ci_id_image` (`ci_id_image` ASC, `ci_ordre` ASC, `ci_ce_utilisateur` ASC) ,
79
  INDEX `ci_ce_utilisateur` (`ci_ce_utilisateur` ASC) )
80
ENGINE = MyISAM
81
AUTO_INCREMENT = 51091
82
DEFAULT CHARACTER SET = utf8;
83
 
84
 
85
-- -----------------------------------------------------
86
-- Table `locations`
87
-- -----------------------------------------------------
88
DROP TABLE IF EXISTS `locations` ;
89
 
90
CREATE  TABLE IF NOT EXISTS `locations` (
91
  `name` VARCHAR(50) NOT NULL ,
92
  `maj_name` VARCHAR(50) NOT NULL ,
93
  `code` VARCHAR(3) NOT NULL DEFAULT '0' ,
94
  `insee_code` VARCHAR(5) NOT NULL DEFAULT '0' ,
95
  `sector` VARCHAR(3) NOT NULL ,
96
  `x_utm` VARCHAR(10) NOT NULL DEFAULT '0' ,
97
  `y_utm` VARCHAR(10) NOT NULL DEFAULT '0' ,
98
  `wgs84_latitude` DOUBLE NOT NULL ,
99
  `wgs84_longitude` DOUBLE NOT NULL ,
100
  `update_date` DATETIME NOT NULL ,
101
  PRIMARY KEY (`name`, `code`) ,
102
  INDEX `MAJ` (`maj_name` ASC, `code` ASC) ,
103
  INDEX `sector` (`sector` ASC, `x_utm` ASC, `y_utm` ASC) )
104
ENGINE = MyISAM
105
DEFAULT CHARACTER SET = utf8;
106
 
107
 
108
-- -----------------------------------------------------
109
-- Table `cel_inventory`
110
-- -----------------------------------------------------
111
DROP TABLE IF EXISTS `cel_inventory` ;
112
 
113
CREATE  TABLE IF NOT EXISTS `cel_inventory` (
114
  `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
115
  `identifiant` VARCHAR(128) NOT NULL ,
116
  `prenom_utilisateur` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Prénom de l\'utilisateur ayant saisi l\'observation.' ,
117
  `nom_utilisateur` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Nom de l\'utilisateur ayant saisi l\'observation.' ,
118
  `ordre` BIGINT(20) NOT NULL ,
119
  `nom_sel` VARCHAR(255) NOT NULL ,
120
  `num_nom_sel` INT(11) NOT NULL ,
121
  `nom_ret` VARCHAR(255) NOT NULL ,
122
  `num_nom_ret` INT(11) NOT NULL ,
123
  `num_taxon` INT(11) NOT NULL ,
124
  `famille` VARCHAR(255) NOT NULL ,
1227 jpm 125
  `nom_referentiel` varchar(25) NOT NULL DEFAULT 'bdnff:4.02',
1178 jpm 126
  `location` VARCHAR(50) NOT NULL ,
127
  `id_location` VARCHAR(10) NOT NULL ,
128
  `date_observation` DATETIME NOT NULL ,
129
  `lieudit` VARCHAR(255) NOT NULL ,
130
  `station` VARCHAR(255) NOT NULL ,
131
  `milieu` VARCHAR(255) NOT NULL ,
132
  `commentaire` VARCHAR(1024) NOT NULL ,
133
  `transmission` TINYINT(4) NOT NULL ,
134
  `date_creation` DATETIME NOT NULL ,
135
  `date_modification` DATETIME NOT NULL ,
136
  `date_transmission` DATETIME NOT NULL ,
137
  `mots_cles` LONGTEXT NOT NULL ,
138
  `mots_cles_texte` TEXT NULL DEFAULT NULL ,
139
  `coord_x` VARCHAR(50) NOT NULL ,
140
  `coord_y` VARCHAR(50) NOT NULL ,
141
  `ref_geo` VARCHAR(25) NOT NULL ,
142
  PRIMARY KEY (`id`) ,
143
  UNIQUE INDEX `identifiant_ordre` (`identifiant` ASC, `ordre` ASC) ,
144
  INDEX `identifiant_date_creation` (`identifiant` ASC, `date_creation` ASC) ,
145
  INDEX `id_location` (`id_location` ASC) ,
146
  INDEX `location` (`location` ASC) ,
147
  INDEX `date_observation` (`date_observation` ASC) ,
148
  INDEX `nom_ret` (`nom_ret` ASC) ,
149
  INDEX `identifiant` (`identifiant` ASC) ,
150
  INDEX `coordonnees` (`coord_x` ASC, `coord_y` ASC) )
151
ENGINE = MyISAM
152
AUTO_INCREMENT = 426426
153
DEFAULT CHARACTER SET = utf8;
154
 
155
 
156
-- -----------------------------------------------------
157
-- Table `cel_mots_cles_images`
158
-- -----------------------------------------------------
159
DROP TABLE IF EXISTS `cel_mots_cles_images` ;
160
 
161
CREATE  TABLE IF NOT EXISTS `cel_mots_cles_images` (
162
  `cmc_mot_cle` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
163
  `cmc_bg` INT(10) NOT NULL ,
164
  `cmc_bd` INT(10) NOT NULL ,
165
  `cmc_id_mot_cle_general` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
166
  `cmc_id_mot_cle_utilisateur` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
167
  `cmc_id_proprietaire` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
168
  `cmc_id_parent` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
169
  `cmc_niveau` INT(10) NOT NULL ,
170
  PRIMARY KEY (`cmc_id_mot_cle_utilisateur`, `cmc_id_proprietaire`) )
171
ENGINE = InnoDB
172
DEFAULT CHARACTER SET = utf8
173
COLLATE = utf8_unicode_ci;
174
 
175
 
176
-- -----------------------------------------------------
177
-- Table `cel_mots_cles_obs`
178
-- -----------------------------------------------------
179
DROP TABLE IF EXISTS `cel_mots_cles_obs` ;
180
 
181
CREATE  TABLE IF NOT EXISTS `cel_mots_cles_obs` (
182
  `cmc_mot_cle` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
183
  `cmc_bg` INT(20) NOT NULL ,
184
  `cmc_bd` INT(20) NOT NULL ,
185
  `cmc_id_mot_cle_general` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
186
  `cmc_id_mot_cle_utilisateur` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
187
  `cmc_id_proprietaire` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
188
  `cmc_id_parent` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
189
  `cmc_niveau` INT(11) NOT NULL ,
190
  PRIMARY KEY (`cmc_id_mot_cle_utilisateur`, `cmc_id_proprietaire`) )
191
ENGINE = InnoDB
192
DEFAULT CHARACTER SET = utf8
193
COLLATE = utf8_unicode_ci
194
COMMENT = 'Table des mots clés, à utiliser avec des transactions !'
195
ROW_FORMAT = COMPACT;
196
 
197
 
198
-- -----------------------------------------------------
199
-- Table `cel_obs_images`
200
-- -----------------------------------------------------
201
DROP TABLE IF EXISTS `cel_obs_images` ;
202
 
203
CREATE  TABLE IF NOT EXISTS `cel_obs_images` (
204
  `coi_ce_image` INT(11) NOT NULL ,
205
  `coi_ce_utilisateur` VARCHAR(100) CHARACTER SET 'utf8' NOT NULL ,
206
  `coi_ce_observation` INT(11) NOT NULL ,
207
  `coi_date_liaison` DATETIME NOT NULL ,
208
  PRIMARY KEY (`coi_ce_image`, `coi_ce_observation`) ,
209
  INDEX `coi_ce_utilisateur` (`coi_ce_utilisateur` ASC) ,
210
  INDEX `coi_ce_observation` (`coi_ce_observation` ASC) ,
211
  INDEX `coi_ce_image` (`coi_ce_image` ASC) )
212
ENGINE = MyISAM
213
DEFAULT CHARACTER SET = utf8
214
COLLATE = utf8_unicode_ci;
215
 
216
 
217
 
218
SET SQL_MODE=@OLD_SQL_MODE;
219
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
220
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;