Cambios en Mysql
Cambios en la base de datos
editDER para las licencias
edit
Código Mysql
edit/* * Parche para el esquema de la base de datos MediaWiki para la Universidad Extremadura para las licencias de página * Tony Sidaway, 26 July, 2005 * Felipa Pablos, 27 July, 2005 * * Noticia Importante * NO EJECUTAR CONTRA EL CODIGO CON LA BASE DE DATOS FUNCIONANDO SI TIENE ART�?CULOS CON LICENCIA * COSAS COMO LA INFORMACIÓN DE LA LICENCIA SE PERDER�? IRREMEDIABLEMENTE */ DROP TABLE license; CREATE TABLE `license` ( `lic_id` int(5) unsigned NOT NULL auto_increment, `lic_name` varchar(255) binary NOT NULL default '', `lic_description` mediumtext NOT NULL, `lic_link` varchar(255) binary default NULL, `lic_nd` int(1) unsigned NOT NULL default '0', `lic_rdf` text NOT NULL, PRIMARY KEY (`lic_id`) ) TYPE=MyISAM COMMENT='Licencias de contenido permitidas en MediaWiki' AUTO_INCREMENT=9 ; /* Importante: Por ahora lic_id 1 debe ser GFDL porque preserva los contenidos GFDL del material guardado en la base de datos. */ INSERT INTO `license` VALUES (1, 'CC-LGPL', 'Creative Commons Little GNu Free Documentation License (licencia menor de la licencia libre de documentación de GNU)', 'http://creativecommons.org/licenses/LGPL/2.1/', 0, '<!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <license rdf:resource="http://creativecommons.org/licenses/LGPL/2.1/" /> <dc:type rdf:resource="http://purl.org/dc/dcmitype/Software" /> </Work> <License rdf:about="http://creativecommons.org/licenses/LGPL/2.1/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> <requires rdf:resource="http://web.resource.org/cc/ShareAlike" /> <requires rdf:resource="http://web.resource.org/cc/SourceCode" /> </License>'); INSERT INTO `license` VALUES (2, 'CC-GPL', 'Creative Commons GNU Public License', 'http://www.gnu.org/copyleft/gpl.html', 0, '<!-- /Creative Commons License -->\r\n\r\n\r\n<!--\r\n\r\n<rdf:RDF xmlns="http://web.resource.org/cc/"\r\n xmlns:dc="http://purl.org/dc/elements/1.1/"\r\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\r\n<Work rdf:about="">\r\n <license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />\r\n <dc:type rdf:resource="http://purl.org/dc/dcmitype/Software" />\r\n</Work>\r\n\r\n<License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">\r\n <permits rdf:resource="http://web.resource.org/cc/Reproduction" />\r\n <permits rdf:resource="http://web.resource.org/cc/Distribution" />\r\n <requires rdf:resource="http://web.resource.org/cc/Notice" />\r\n <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />\r\n <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />\r\n <requires rdf:resource="http://web.resource.org/cc/SourceCode" />\r\n</License>\r\n\r\n'); INSERT INTO `license` VALUES (3, 'CC-By', 'Creative Commons Reconocimiento', 'http://creativecommons.org/licenses/by/2.5/es/deed.es', 0, '<!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <license rdf:resource="http://creativecommons.org/licenses/by/2.5/es/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by/2.5/es/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> </License> '); INSERT INTO `license` VALUES (4, 'CC-By-Nc', 'Creative Commons Reconocimiento - NoComercial', 'http://creativecommons.org/licenses/by-nc/2.5/es/deed.es', 0, '<!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <license rdf:resource="http://creativecommons.org/licenses/by-nc/2.5/es/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-nc/2.5/es/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> </License>'); INSERT INTO `license` VALUES (5, 'CC-By-Nc-Sa', 'Creative Commons Reconocimiento - NoComercial - CompartirIgual', 'http://creativecommons.org/licenses/by-nc-sa/2.5/es/deed.es', 0, ' <!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.5/es/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/es/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> <requires rdf:resource="http://web.resource.org/cc/ShareAlike" /> </License>'); INSERT INTO `license` VALUES (6, 'CC-By-Nc-Nd', 'Creative Commons Reconocimiento - NoComercial - SinObraDerivada', 'http://creativecommons.org/licenses/by-nc-nd/2.5/es/deed.es', 1, '<!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.5/es/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-nc-nd/2.5/es/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" /> </License>'); INSERT INTO `license` VALUES (7, 'CC-By-Nd', 'Creative Commons Reconocimiento - SinObraDerivada', 'http://creativecommons.org/licenses/by-nd/2.5/es/deed.es', 1, '<!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <license rdf:resource="http://creativecommons.org/licenses/by-nd/2.5/es/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-nd/2.5/es/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> </License>'); INSERT INTO `license` VALUES (8, 'CC-By-Sa', 'Creative Commons Reconocimiento - CompartirIgual', 'http://creativecommons.org/licenses/by-sa/2.5/es/deed.es', 0, '<!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/es/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/es/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> <requires rdf:resource="http://web.resource.org/cc/ShareAlike" /> </License>'); alter table cur add cur_lic_id int(5) unsigned NOT NULL default 5; alter table archive add ar_lic_id int(5) unsigned NOT NULL default 5; update license set lic_nd=1 where lic_name like '%Nd'; alter table image add im_lic_id int(5) unsigned default '5' not null; ALTER TABLE `oldimage` ADD `oi_lic_id` INT( 5 ) UNSIGNED DEFAULT '5' NOT NULL ; ALTER TABLE `user` ADD `user_default_lic` INT( 5 ) UNSIGNED DEFAULT '5' NOT NULL;
- NOTA: Si la base de datos necesita prefijo, añadirlo en la tabla licenses.