Changeset 5139
- Timestamp:
- Jun 12, 2017, 2:53:13 PM (4 years ago)
- Location:
- pmb4.2/trunk/fuentes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pmb4.2/trunk/fuentes/debian/changelog
r5125 r5139 1 pmb (4.2.6+lliurex19) xenial; urgency=medium 2 3 * Add method for fix indexation bug when import corrupt bbdd backups 4 5 -- Juan Ramon Pelegrina <juapesai@hotmail.com> Mon, 12 Jun 2017 14:37:41 +0200 6 1 7 pmb (4.2.6+lliurex18) xenial; urgency=medium 2 8 -
pmb4.2/trunk/fuentes/pmb/admin/misc/alter_vLlxTrusty.inc.php
r5124 r5139 29 29 30 30 } 31 32 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_key = 'PRI'"; 33 $res=mysql_query($rqt, $dbh); 34 $data = mysql_num_rows($res) ; 35 if ($data == 0) { 36 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'num_word'"; 37 $res=mysql_query($rqt, $dbh); 38 $data = mysql_num_rows($res) ; 39 if ($data == 0) { 40 $rqt= "alter table notices_mots_global_index add num_word int(10) unsigned not null default 0 after mot"; 41 $res=mysql_query($rqt, $dbh); 42 } 43 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'mot'"; 44 $res=mysql_query($rqt, $dbh); 45 $data = mysql_num_rows($res) ; 46 if ($data > 0) { 47 $rqt= "alter table notices_mots_global_index drop mot"; 48 $res=mysql_query($rqt, $dbh); 49 } 50 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'nbr_mot'"; 51 $res=mysql_query($rqt, $dbh); 52 $data = mysql_num_rows($res) ; 53 if ($data > 0) { 54 $rqt= "alter table notices_mots_global_index drop nbr_mot"; 55 $res=mysql_query($rqt, $dbh); 56 } 57 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'lang'"; 58 $res=mysql_query($rqt, $dbh); 59 $data = mysql_num_rows($res) ; 60 if ($data > 0) { 61 $rqt= "alter table notices_mots_global_index drop lang"; 62 $res=mysql_query($rqt, $dbh); 63 } 64 $rqt = "alter table notices_mots_global_index add PRIMARY KEY (id_notice, code_champ,code_ss_champ, num_word, position)"; 65 $res=mysql_query($rqt, $dbh); 66 67 } 68 69 70 71 31 72 //-----------------------FIN LLIUREX 09/06/2017 32 73 -
pmb4.2/trunk/fuentes/pmb/copia_seg_importa.php
r5124 r5139 127 127 $rqt= "alter table notices_mots_global_index drop PRIMARY KEY"; 128 128 $res=mysql_query($rqt, $dbh); 129 }else{ 130 131 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'num_word'"; 132 $res=mysql_query($rqt, $dbh); 133 $data = mysql_num_rows($res) ; 134 if ($data == 0) { 135 $rqt= "alter table notices_mots_global_index add num_word int(10) unsigned not null default 0 after mot"; 136 $res=mysql_query($rqt, $dbh); 137 } 138 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'mot'"; 139 $res=mysql_query($rqt, $dbh); 140 $data = mysql_num_rows($res) ; 141 if ($data > 0) { 142 $rqt= "alter table notices_mots_global_index drop mot"; 143 $res=mysql_query($rqt, $dbh); 144 } 145 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'nbr_mot'"; 146 $res=mysql_query($rqt, $dbh); 147 $data = mysql_num_rows($res) ; 148 if ($data > 0) { 149 $rqt= "alter table notices_mots_global_index drop nbr_mot"; 150 $res=mysql_query($rqt, $dbh); 151 } 152 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'lang'"; 153 $res=mysql_query($rqt, $dbh); 154 $data = mysql_num_rows($res) ; 155 if ($data > 0) { 156 $rqt= "alter table notices_mots_global_index drop lang"; 157 $res=mysql_query($rqt, $dbh); 158 } 159 129 160 } 161 130 162 $rqt= "alter table notices_mots_global_index add PRIMARY KEY (id_notice, code_champ, code_ss_champ, num_word, position, field_position)"; 131 163 $res=mysql_query($rqt, $dbh);
Note: See TracChangeset
for help on using the changeset viewer.