diff options
author | ramon <ramongomez@us.es> | 2018-02-26 09:35:59 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2018-02-26 09:35:59 +0000 |
commit | aaf6857f3bd2133a452b054c32b1071f8d184a63 (patch) | |
tree | 60cbf389d513c20b6f268b7e69d34ea3ac371192 /admin/Database | |
parent | 04cc6bf03f73d3712fcd2cbeb496727eabeea6e2 (diff) |
#816: Integrar código del ticket:816 en rama {{{branches/version1.1}}}
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5615 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Database')
-rw-r--r-- | admin/Database/ogAdmBD-1.1.1pre.sql | 18 | ||||
-rw-r--r-- | admin/Database/ogAdmBD.sql | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/admin/Database/ogAdmBD-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.1pre.sql index 43010d1c..cdac985b 100644 --- a/admin/Database/ogAdmBD-1.1.1pre.sql +++ b/admin/Database/ogAdmBD-1.1.1pre.sql @@ -2,3 +2,21 @@ # OpenGnsys 1.1.1 #use ogAdmBD +# Eliminar procedimiento y disparador para evitar errores de ejecución. +DROP PROCEDURE IF EXISTS addcols; +# Procedimiento para actualización condicional de tablas. +DELIMITER '//' +CREATE PROCEDURE addcols() BEGIN + # Añadir campo para incluir PC de profesor de aula (ticket #816). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='idordprofesor' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE aulas + ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; + END IF; +END// +# Ejecutar actualización condicional. +DELIMITER ';' +CALL addcols(); +DROP PROCEDURE addcols; + diff --git a/admin/Database/ogAdmBD.sql b/admin/Database/ogAdmBD.sql index c126f63c..b45b59d8 100644 --- a/admin/Database/ogAdmBD.sql +++ b/admin/Database/ogAdmBD.sql @@ -119,6 +119,7 @@ CREATE TABLE `aulas` ( `ubicacion` varchar(255) DEFAULT NULL, `comentarios` text, `puestos` smallint DEFAULT NULL, + `idordprofesor` int(11) DEFAULT 0, `horaresevini` tinyint(4) DEFAULT NULL, `horaresevfin` tinyint(4) DEFAULT NULL, `modomul` tinyint(4) NOT NULL DEFAULT '0', |