diff options
author | ramon <ramongomez@us.es> | 2015-12-16 10:24:35 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2015-12-16 10:24:35 +0000 |
commit | 56529d24a607c3a027491c42482705d96dc044bc (patch) | |
tree | b19898fc331f77b2cce9948c871280371280c714 /admin | |
parent | 1893b9d3da7616cfea7ece81ddbff1d2a8a0174e (diff) |
#678: Modificar BD para separar directorios para distintas unidades organizativas.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4759 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin')
-rw-r--r-- | admin/Database/ogAdmBD-1.0.6-1.1.0pre.sql | 5 | ||||
-rw-r--r-- | admin/Database/ogAdmBD-1.1.0pre.sql | 11 | ||||
-rw-r--r-- | admin/Database/ogAdmBD.sql | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/admin/Database/ogAdmBD-1.0.6-1.1.0pre.sql b/admin/Database/ogAdmBD-1.0.6-1.1.0pre.sql index 476f7253..4d2aa2d4 100644 --- a/admin/Database/ogAdmBD-1.0.6-1.1.0pre.sql +++ b/admin/Database/ogAdmBD-1.0.6-1.1.0pre.sql @@ -46,4 +46,9 @@ INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES ALTER TABLE ordenadores ADD numserie varchar(25) DEFAULT NULL AFTER nombreordenador; +# Directorios en repo para distintas UO (ticket #678). +ALTER TABLE entidades + ADD ogunit TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE centros + ADD directorio VARCHAR(50) DEFAULT ''; diff --git a/admin/Database/ogAdmBD-1.1.0pre.sql b/admin/Database/ogAdmBD-1.1.0pre.sql index 90a413d4..811aed1f 100644 --- a/admin/Database/ogAdmBD-1.1.0pre.sql +++ b/admin/Database/ogAdmBD-1.1.0pre.sql @@ -56,6 +56,17 @@ CREATE PROCEDURE addcols() BEGIN ALTER TABLE aulas ADD ntp VARCHAR(30) AFTER proxy; END IF; + # Directorios en repo para distintas UO (ticket #678). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='ogunit' AND TABLE_NAME='entidades' AND TABLE_SCHEMA=DATABASE()) + ALTER TABLE entidades + ADD ogunit TINYINT(1) NOT NULL DEFAULT 0; + END IF; + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='directorio' AND TABLE_NAME='centros' AND TABLE_SCHEMA=DATABASE()) + ALTER TABLE centros + ADD directorio VARCHAR(50) DEFAULT ''; + END IF; END// # Ejecutar actualizaciĆ³n condicional. delimiter ';' diff --git a/admin/Database/ogAdmBD.sql b/admin/Database/ogAdmBD.sql index 1cec7307..5e4b7fbd 100644 --- a/admin/Database/ogAdmBD.sql +++ b/admin/Database/ogAdmBD.sql @@ -176,6 +176,7 @@ CREATE TABLE IF NOT EXISTS `centros` ( `nombrecentro` varchar(100) NOT NULL DEFAULT '', `identidad` int(11) DEFAULT NULL, `comentarios` text, + `directorio` varchar(50) DEFAULT '', PRIMARY KEY (`idcentro`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; @@ -244,6 +245,7 @@ CREATE TABLE IF NOT EXISTS `entidades` ( `comentarios` text, `iduniversidad` int(11) DEFAULT NULL, `grupoid` int(11) DEFAULT NULL, + `ogunit` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`identidad`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; |