Subversion Repositories eFlore/Applications.cel

Rev

Go to most recent revision | Details | 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 ,
125
  `location` VARCHAR(50) NOT NULL ,
126
  `id_location` VARCHAR(10) NOT NULL ,
127
  `date_observation` DATETIME NOT NULL ,
128
  `lieudit` VARCHAR(255) NOT NULL ,
129
  `station` VARCHAR(255) NOT NULL ,
130
  `milieu` VARCHAR(255) NOT NULL ,
131
  `commentaire` VARCHAR(1024) NOT NULL ,
132
  `transmission` TINYINT(4) NOT NULL ,
133
  `date_creation` DATETIME NOT NULL ,
134
  `date_modification` DATETIME NOT NULL ,
135
  `date_transmission` DATETIME NOT NULL ,
136
  `mots_cles` LONGTEXT NOT NULL ,
137
  `mots_cles_texte` TEXT NULL DEFAULT NULL ,
138
  `coord_x` VARCHAR(50) NOT NULL ,
139
  `coord_y` VARCHAR(50) NOT NULL ,
140
  `ref_geo` VARCHAR(25) NOT NULL ,
141
  PRIMARY KEY (`id`) ,
142
  UNIQUE INDEX `identifiant_ordre` (`identifiant` ASC, `ordre` ASC) ,
143
  INDEX `identifiant_date_creation` (`identifiant` ASC, `date_creation` ASC) ,
144
  INDEX `id_location` (`id_location` ASC) ,
145
  INDEX `location` (`location` ASC) ,
146
  INDEX `date_observation` (`date_observation` ASC) ,
147
  INDEX `nom_ret` (`nom_ret` ASC) ,
148
  INDEX `identifiant` (`identifiant` ASC) ,
149
  INDEX `coordonnees` (`coord_x` ASC, `coord_y` ASC) )
150
ENGINE = MyISAM
151
AUTO_INCREMENT = 426426
152
DEFAULT CHARACTER SET = utf8;
153
 
154
 
155
-- -----------------------------------------------------
156
-- Table `cel_mots_cles_images`
157
-- -----------------------------------------------------
158
DROP TABLE IF EXISTS `cel_mots_cles_images` ;
159
 
160
CREATE  TABLE IF NOT EXISTS `cel_mots_cles_images` (
161
  `cmc_mot_cle` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
162
  `cmc_bg` INT(10) NOT NULL ,
163
  `cmc_bd` INT(10) NOT NULL ,
164
  `cmc_id_mot_cle_general` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
165
  `cmc_id_mot_cle_utilisateur` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
166
  `cmc_id_proprietaire` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
167
  `cmc_id_parent` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
168
  `cmc_niveau` INT(10) NOT NULL ,
169
  PRIMARY KEY (`cmc_id_mot_cle_utilisateur`, `cmc_id_proprietaire`) )
170
ENGINE = InnoDB
171
DEFAULT CHARACTER SET = utf8
172
COLLATE = utf8_unicode_ci;
173
 
174
 
175
-- -----------------------------------------------------
176
-- Table `cel_mots_cles_obs`
177
-- -----------------------------------------------------
178
DROP TABLE IF EXISTS `cel_mots_cles_obs` ;
179
 
180
CREATE  TABLE IF NOT EXISTS `cel_mots_cles_obs` (
181
  `cmc_mot_cle` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
182
  `cmc_bg` INT(20) NOT NULL ,
183
  `cmc_bd` INT(20) NOT NULL ,
184
  `cmc_id_mot_cle_general` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
185
  `cmc_id_mot_cle_utilisateur` VARCHAR(128) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
186
  `cmc_id_proprietaire` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
187
  `cmc_id_parent` VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL ,
188
  `cmc_niveau` INT(11) NOT NULL ,
189
  PRIMARY KEY (`cmc_id_mot_cle_utilisateur`, `cmc_id_proprietaire`) )
190
ENGINE = InnoDB
191
DEFAULT CHARACTER SET = utf8
192
COLLATE = utf8_unicode_ci
193
COMMENT = 'Table des mots clés, à utiliser avec des transactions !'
194
ROW_FORMAT = COMPACT;
195
 
196
 
197
-- -----------------------------------------------------
198
-- Table `cel_obs_images`
199
-- -----------------------------------------------------
200
DROP TABLE IF EXISTS `cel_obs_images` ;
201
 
202
CREATE  TABLE IF NOT EXISTS `cel_obs_images` (
203
  `coi_ce_image` INT(11) NOT NULL ,
204
  `coi_ce_utilisateur` VARCHAR(100) CHARACTER SET 'utf8' NOT NULL ,
205
  `coi_ce_observation` INT(11) NOT NULL ,
206
  `coi_date_liaison` DATETIME NOT NULL ,
207
  PRIMARY KEY (`coi_ce_image`, `coi_ce_observation`) ,
208
  INDEX `coi_ce_utilisateur` (`coi_ce_utilisateur` ASC) ,
209
  INDEX `coi_ce_observation` (`coi_ce_observation` ASC) ,
210
  INDEX `coi_ce_image` (`coi_ce_image` ASC) )
211
ENGINE = MyISAM
212
DEFAULT CHARACTER SET = utf8
213
COLLATE = utf8_unicode_ci;
214
 
215
 
216
 
217
SET SQL_MODE=@OLD_SQL_MODE;
218
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
219
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;