summaryrefslogtreecommitdiffstats
path: root/src/schema.c
Commit message (Collapse)AuthorAgeFilesLines
* #1037 Add disk typeJavier Sánchez Parra2021-05-261-0/+38
| | | | | | | Add ogServer support for parsing and storing in the DB disk type data from ogClient refresh response. See also commits with #1037 in ogClient and WebConsole repo.
* ogServer is AGPLv3+OpenGnSys Support Team2021-05-041-2/+3
| | | | Update license header in files.
* #1042 Add schema version 2Jose M. Guisado2021-04-281-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add foreign keys (version 1 introduced innoDB as default db engine) allowing cascade deletions for some tables: - perfilessoft_softwares If a software profile or a software component is deleted, the corresponding row in this table will be deleted too. - ordenadores_particiones If a computer or a partition is deleted from the DB, delete the corresponding row inside this table. - aulas If the center the room is in is removed, delete the room too. - ordenadores If the room in which a computer is in is removed, the computer will be deleted accordingly. We should take into account that this schema superseeds some code regarding deletions inside WebConsole that probably are not needed any more, at least for the tables mentioned. (See admin/WebConsole/gestores/relaciones/*.php in OpenGnsys repo)
* #1042 Update database schema automaticallyJose M. Guisado2021-04-201-0/+159
This patch adds database schema management capabilities to ogServer: - ogServer now tracks the version of its database schema, if no version is detected, creates a 'version' table with a single row starting at 0. - ogServer can upgrade its database schema to a newer version if detected. (ogServer ships required SQL commands to do so) If ogServer is unable to upgrade the schema at startup (if needed be) it *will not* start. Defines schema update v1 which upgrades database engine tables of ogServer database (usually named 'ogAdmBD') from myISAM to innoDB.