diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-07-17 10:33:28 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-07-17 10:33:28 +0200 |
commit | 2b15bdbeff76715a7c56792c362b04621ab2e967 (patch) | |
tree | 08524d85d35e0d9fb0c831dd4783de5654d0b6ab /admin/Database | |
parent | 3b5fb9d7283a872fb4524c794ed6311a9d50589f (diff) |
#991: Updating SQL files.
Diffstat (limited to 'admin/Database')
l--------- | admin/Database/ogAdmBD-1.1.0-1.1.1b.sql | 1 | ||||
l--------- | admin/Database/ogAdmBD-1.1.0-1.1.1c.sql | 1 | ||||
-rw-r--r-- | admin/Database/ogAdmBD-1.1.0a-1.1.1c.sql (renamed from admin/Database/ogAdmBD-1.1.0a-1.1.1b.sql) | 2 | ||||
l--------- | admin/Database/ogAdmBD-1.1.1-1.2.0.sql | 2 | ||||
l--------- | admin/Database/ogAdmBD-1.1.1a-1.2.0.sql | 2 | ||||
l---------[-rw-r--r--] | admin/Database/ogAdmBD-1.1.1b-1.2.0.sql | 23 | ||||
-rw-r--r-- | admin/Database/ogAdmBD-1.1.1c-1.2.0.sql | 36 | ||||
l--------- | admin/Database/ogAdmBD-1.1.1pre-1.1.1b.sql | 1 | ||||
l--------- | admin/Database/ogAdmBD-1.1.1pre-1.1.1c.sql | 1 | ||||
l--------- | admin/Database/ogAdmBD-1.2.0.sql | 1 |
10 files changed, 43 insertions, 27 deletions
diff --git a/admin/Database/ogAdmBD-1.1.0-1.1.1b.sql b/admin/Database/ogAdmBD-1.1.0-1.1.1b.sql deleted file mode 120000 index 244cb4e5..00000000 --- a/admin/Database/ogAdmBD-1.1.0-1.1.1b.sql +++ /dev/null @@ -1 +0,0 @@ -ogAdmBD-1.1.0a-1.1.1b.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.1.0-1.1.1c.sql b/admin/Database/ogAdmBD-1.1.0-1.1.1c.sql new file mode 120000 index 00000000..375e279e --- /dev/null +++ b/admin/Database/ogAdmBD-1.1.0-1.1.1c.sql @@ -0,0 +1 @@ +ogAdmBD-1.1.0a-1.1.1c.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.1.0a-1.1.1b.sql b/admin/Database/ogAdmBD-1.1.0a-1.1.1c.sql index 53e36ca4..ba206053 100644 --- a/admin/Database/ogAdmBD-1.1.0a-1.1.1b.sql +++ b/admin/Database/ogAdmBD-1.1.0a-1.1.1c.sql @@ -1,5 +1,5 @@ ### Fichero de actualización de la base de datos. -# OpenGnsys 1.1.0, 1.1.0a, 1.1.1pre - OpenGnsys 1.1.1b +# OpenGnsys 1.1.0, 1.1.0a, 1.1.1pre - OpenGnsys 1.1.1c #use ogAdmBD # Eliminar procedimiento y disparador para evitar errores de ejecución. diff --git a/admin/Database/ogAdmBD-1.1.1-1.2.0.sql b/admin/Database/ogAdmBD-1.1.1-1.2.0.sql index decf63ea..d122cb44 120000 --- a/admin/Database/ogAdmBD-1.1.1-1.2.0.sql +++ b/admin/Database/ogAdmBD-1.1.1-1.2.0.sql @@ -1 +1 @@ -ogAdmBD-1.1.1b-1.2.0.sql
\ No newline at end of file +ogAdmBD-1.1.1c-1.2.0.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.1.1a-1.2.0.sql b/admin/Database/ogAdmBD-1.1.1a-1.2.0.sql index decf63ea..d122cb44 120000 --- a/admin/Database/ogAdmBD-1.1.1a-1.2.0.sql +++ b/admin/Database/ogAdmBD-1.1.1a-1.2.0.sql @@ -1 +1 @@ -ogAdmBD-1.1.1b-1.2.0.sql
\ No newline at end of file +ogAdmBD-1.1.1c-1.2.0.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.1.1b-1.2.0.sql b/admin/Database/ogAdmBD-1.1.1b-1.2.0.sql index 1a52583b..d122cb44 100644..120000 --- a/admin/Database/ogAdmBD-1.1.1b-1.2.0.sql +++ b/admin/Database/ogAdmBD-1.1.1b-1.2.0.sql @@ -1,22 +1 @@ -### Fichero de actualización de la base de datos. -# OpenGnsys 1.1.1, 1.1.1a, 1.1.1b - OpenGnsys 1.2.0 -#use ogAdmBD - -DROP PROCEDURE IF EXISTS addcols; -# Procedimiento para actualización condicional de tablas. -DELIMITER '//' -CREATE PROCEDURE addcols() BEGIN - # Añadir campos fila y columna para localización de ordenador en el aula (ticket #944). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='n_row' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores - ADD n_row SMALLINT DEFAULT 0, - ADD n_col SMALLINT DEFAULT 0; - END IF; -END// -# Ejecutar actualización condicional. -DELIMITER ';' -CALL addcols(); -DROP PROCEDURE addcols; - +ogAdmBD-1.1.1c-1.2.0.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.1.1c-1.2.0.sql b/admin/Database/ogAdmBD-1.1.1c-1.2.0.sql new file mode 100644 index 00000000..e02aad1e --- /dev/null +++ b/admin/Database/ogAdmBD-1.1.1c-1.2.0.sql @@ -0,0 +1,36 @@ +### Fichero de actualización de la base de datos. +# OpenGnsys 1.1.1, 1.1.1a, 1.1.1b, 1.1.1c - OpenGnsys 1.2.0 +#use ogAdmBD + +DROP PROCEDURE IF EXISTS altercols; +# Procedimiento para actualización condicional de tablas. +DELIMITER '//' +CREATE PROCEDURE altercols() BEGIN + # Añadir campos fila y columna para localización de ordenador en el aula (ticket #944). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='n_row' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores + ADD n_row SMALLINT NOT NULL DEFAULT 0, + ADD n_col SMALLINT NOT NULL DEFAULT 0; + END IF; + # Añadir campos de ordenador en mantenimiento y con acceso remoto (tickets #991 y #992). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores + ADD inremotepc SMALLINT NOT NULL DEFAULT 0, + ADD maintenance SMALLINT NOT NULL DEFAULT 0; + END IF; +END// +# Ejecutar actualización condicional. +DELIMITER ';' +CALL altercols(); +DROP PROCEDURE altercols; + +# Redefinir algunos campos como no nulos. +ALTER TABLE aulas + MODIFY inremotepc SMALLINT NOT NULL DEFAULT 0; +ALTER TABLE imagenes + MODIFY inremotepc SMALLINT NOT NULL DEFAULT 0; + diff --git a/admin/Database/ogAdmBD-1.1.1pre-1.1.1b.sql b/admin/Database/ogAdmBD-1.1.1pre-1.1.1b.sql deleted file mode 120000 index 244cb4e5..00000000 --- a/admin/Database/ogAdmBD-1.1.1pre-1.1.1b.sql +++ /dev/null @@ -1 +0,0 @@ -ogAdmBD-1.1.0a-1.1.1b.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.1.1pre-1.1.1c.sql b/admin/Database/ogAdmBD-1.1.1pre-1.1.1c.sql new file mode 120000 index 00000000..375e279e --- /dev/null +++ b/admin/Database/ogAdmBD-1.1.1pre-1.1.1c.sql @@ -0,0 +1 @@ +ogAdmBD-1.1.0a-1.1.1c.sql
\ No newline at end of file diff --git a/admin/Database/ogAdmBD-1.2.0.sql b/admin/Database/ogAdmBD-1.2.0.sql new file mode 120000 index 00000000..d122cb44 --- /dev/null +++ b/admin/Database/ogAdmBD-1.2.0.sql @@ -0,0 +1 @@ +ogAdmBD-1.1.1c-1.2.0.sql
\ No newline at end of file |