Last change
on this file was
112150,
checked in by abelass@…, 14 months ago
|
v1.2.0 optimiser
- harmoniser nom colonnes lat lon avec gis et pays
- indexer des colonnes
|
File size:
1.5 KB
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Fichier gérant l'installation et désinstallation du plugin Continents |
---|
4 | * |
---|
5 | * @plugin Continents |
---|
6 | * @copyright 2013 - 2018 |
---|
7 | * @author Rainer Müller |
---|
8 | * @licence GNU/GPL |
---|
9 | * @package SPIP\Continents\Installation |
---|
10 | */ |
---|
11 | if (!defined('_ECRIRE_INC_VERSION')) |
---|
12 | return; |
---|
13 | |
---|
14 | function continents_upgrade($nom_meta_base_version, $version_cible) { |
---|
15 | $maj = array(); |
---|
16 | |
---|
17 | include_spip('base/upgrade'); |
---|
18 | include_spip('base/continents_peupler'); |
---|
19 | $maj['create'] = array( |
---|
20 | array( |
---|
21 | 'maj_tables', |
---|
22 | array( |
---|
23 | 'spip_pays', |
---|
24 | 'spip_continents' |
---|
25 | ) |
---|
26 | ), |
---|
27 | array( |
---|
28 | 'peupler_base_continents' |
---|
29 | ), |
---|
30 | array( |
---|
31 | 'inserer_table_pays' |
---|
32 | ) |
---|
33 | ); |
---|
34 | |
---|
35 | $maj['1.1.0'] = array( |
---|
36 | array( |
---|
37 | 'maj_tables', |
---|
38 | array( |
---|
39 | 'spip_continents' |
---|
40 | ) |
---|
41 | ), |
---|
42 | array( |
---|
43 | 'inserer_codes_iso' |
---|
44 | ) |
---|
45 | ); |
---|
46 | |
---|
47 | $maj['1.2.0'] = array( |
---|
48 | array( |
---|
49 | 'sql_alter', |
---|
50 | 'TABLE spip_continents CHANGE COLUMN latitude lat DOUBLE NULL NULL' |
---|
51 | ), |
---|
52 | array( |
---|
53 | 'sql_alter', |
---|
54 | 'TABLE spip_continents CHANGE COLUMN longitude lon DOUBLE NULL NULL' |
---|
55 | ), |
---|
56 | array( |
---|
57 | 'sql_alter', |
---|
58 | 'TABLE spip_continents ADD INDEX `code_iso_a2` (`code_iso_a2`)' |
---|
59 | ), |
---|
60 | array( |
---|
61 | 'sql_alter', |
---|
62 | 'TABLE spip_continents ADD INDEX `code_iso_a3` (`code_iso_a3`)' |
---|
63 | ), |
---|
64 | array( |
---|
65 | 'sql_alter', |
---|
66 | 'TABLE spip_continents ADD INDEX (lat)' |
---|
67 | ), |
---|
68 | array( |
---|
69 | 'sql_alter', |
---|
70 | 'TABLE spip_continents ADD INDEX (lon)' |
---|
71 | ), |
---|
72 | ); |
---|
73 | |
---|
74 | maj_plugin($nom_meta_base_version, $version_cible, $maj); |
---|
75 | } |
---|
76 | |
---|
77 | function continents_vider_tables($nom_meta_base_version) { |
---|
78 | sql_drop_table("spip_continents"); |
---|
79 | |
---|
80 | effacer_meta($nom_meta_base_version); |
---|
81 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.