Changeset 5124
- Timestamp:
- Jun 9, 2017, 12:23:20 PM (4 years ago)
- Location:
- pmb4.2/trunk/fuentes/pmb
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pmb4.2/trunk/fuentes/pmb/admin/misc/alter_vLlxTrusty.inc.php
r1124 r5124 19 19 $action=$increment; 20 20 echo "<table ><tr><th>".$msg['admin_misc_action']."</th><th>".$msg['admin_misc_resultat']."</th></tr>"; 21 22 //-----------------------LLIUREX 09/06/2017----Add champ field_position to notices_mots_global_index------------ 23 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'field_position'"; 24 $res=pmb_mysql_query($rqt,$dbh); 25 $data=pmb_mysql_num_rows($res); 26 if ($data == 0) { 27 $rqt= "alter table notices_mots_global_index add column field_position int not null default 1"; 28 $res=pmb_mysql_query($rqt, $dbh); 29 30 } 31 //-----------------------FIN LLIUREX 09/06/2017 32 21 33 // +-------------------------------------------------+ 22 34 // MB - Indexer la colonne num_renvoi_voir de la table noeuds 35 23 36 $rqt = "ALTER TABLE noeuds DROP INDEX i_num_renvoi_voir"; 24 37 echo traite_rqt($rqt,"ALTER TABLE noeuds DROP INDEX i_num_renvoi_voir"); -
pmb4.2/trunk/fuentes/pmb/copia_seg_importa.php
r5119 r5124 101 101 $res = mysql_query($rqt, $dbh); 102 102 //---------------LLIUREX 08/06/2017--Se añade campo a la tabla notices_mots_global index----------------- 103 104 echo "<SCRIPT>alert(\"".$msg[close_session]." ".$msg[database_update]."\");</SCRIPT>"; 105 echo("<SCRIPT LANGUAGE='JavaScript'> window.alert($msg[close_session])</SCRIPT>"); 106 echo("<SCRIPT LANGUAGE='JavaScript'> window.location = \"$base_path/\"</SCRIPT>"); 107 break; 108 109 } 110 case 'v5.19':{ 111 //Se añade campo a la tabla notices_mots_global index----------------- 103 112 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name = 'field_position'"; 104 113 $res=mysql_query($rqt, $dbh); … … 107 116 $rqt= "alter table notices_mots_global_index add column field_position int not null default 1"; 108 117 $res=mysql_query($rqt, $dbh); 118 } 119 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_name='field_position' and column_key = 'PRI'"; 120 $res=mysql_query($rqt, $dbh); 121 $data = mysql_num_rows($res) ; 122 if ($data ==0){ 123 $rqt = "select * from information_schema.columns where table_name = 'notices_mots_global_index' and table_schema ='pmb' and column_key = 'PRI'"; 124 $res=mysql_query($rqt, $dbh); 125 $data = mysql_num_rows($res) ; 126 if ($data >0){ 127 $rqt= "alter table notices_mots_global_index drop PRIMARY KEY"; 128 $res=mysql_query($rqt, $dbh); 129 } 130 $rqt= "alter table notices_mots_global_index add PRIMARY KEY (id_notice, code_champ, code_ss_champ, num_word, position, field_position)"; 131 $res=mysql_query($rqt, $dbh); 132 133 } 134 //--------------FIN LLIUREX 08/06/2017 ----------------- 109 135 110 } 111 //-------------------------- FIN LLIUREX 08/06/2017 -------------------------- 112 136 113 137 echo "<SCRIPT>alert(\"".$msg[close_session]." ".$msg[database_update]."\");</SCRIPT>"; 114 138 echo("<SCRIPT LANGUAGE='JavaScript'> window.alert($msg[close_session])</SCRIPT>"); -
pmb4.2/trunk/fuentes/pmb/lliurex/pmb4_base.sql
r5121 r5124 1501 1501 LOCK TABLES `categories` WRITE; 1502 1502 /*!40000 ALTER TABLE `categories` DISABLE KEYS */; 1503 INSERT INTO `categories` VALUES (1,3,'fr_FR','~termes non classés','','','',' termes non classes ','',''),(1,2,'fr_FR','~termes orphelins','','','',' termes orphelins ','',''),(1,2,'es_ES','~descriptores no clasificados','','','',' descriptores no clasificados ','',''),(1,3,'es_ES','~descriptores huérfanos','','','',' descriptores huérfanos ','',''); 1503 INSERT INTO `categories` (`num_thesaurus`, `num_noeud`, `langue`, `libelle_categorie`, `note_application`, `comment_public`, `comment_voir`, `index_categorie`, `path_word_categ`, `index_path_word_categ`) VALUES 1504 (1, 3, 'fr_FR', '~termes non classés', '', '', '', ' termes non classes ', '', ''), 1505 (1, 2, 'fr_FR', '~termes orphelins', '', '', '', ' termes orphelins ', '', ''), 1506 (1, 2, 'es_ES', '~descripotres no clasificados', '', '', '', ' descriptores no clasificados ', '', ''), 1507 (1, 3, 'es_ES', '~descriptores huérfanos', '', '', '', ' descriptores huérfanos ', '', ''); 1504 1508 /*!40000 ALTER TABLE `categories` ENABLE KEYS */; 1505 1509 UNLOCK TABLES; … … 5705 5709 PRIMARY KEY (`indexint_id`), 5706 5710 UNIQUE KEY `indexint_name` (`indexint_name`,`num_pclass`) 5707 ) ENGINE=MyISAM AUTO_INCREMENT=786DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;5711 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 5708 5712 /*!40101 SET character_set_client = @saved_cs_client */; 5709 5713 -
pmb4.2/trunk/fuentes/pmb/lliurex/utilidades_sql/Update_tables.sql
r5121 r5124 17 17 ALTER TABLE notices_mots_global_index ADD field_position int not null default 1; 18 18 19 IF EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='pmb' AND TABLE_NAME='notices_mots_global_index' AND COLUMN_NAME='id_notice' AND COLUMN_KEY='PRI')) THEN 20 ALTER TABLE notices_mots_global_index DROP PRIMARY KEY; 21 END IF; 22 ALTER TABLE notices_mots_global_index ADD PRIMARY KEY (id_notice, code_champ, code_ss_champ, num_word, position, field_position); 19 END IF; 23 20 24 ELSE 25 IF NOT EXISTS ((SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='pmb' AND TABLE_NAME='notices_mots_global_index' AND COLUMN_NAME='field_position' AND COLUMN_KEY='PRI')) THEN 26 ALTER TABLE notices_mots_global_index DROP PRIMARY KEY; 27 ALTER TABLE notices_mots_global_index ADD PRIMARY KEY (id_notice, code_champ, code_ss_champ, num_word, position, field_position); 28 END IF; 29 END IF; 21 IF NOT EXISTS ((SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='pmb' AND TABLE_NAME='notices_mots_global_index' AND COLUMN_NAME='field_position' AND COLUMN_KEY='PRI')) THEN 22 IF EXISTS( (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='pmb' AND TABLE_NAME='notices_mots_global_index' AND COLUMN_KEY='PRI')) THEN 23 ALTER TABLE notices_mots_global_index DROP PRIMARY KEY; 24 END IF; 25 ALTER TABLE notices_mots_global_index ADD PRIMARY KEY (id_notice, code_champ, code_ss_champ, num_word, position, field_position); 26 27 END IF; 30 28 31 29 END $$
Note: See TracChangeset
for help on using the changeset viewer.