diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2021-04-19 09:26:31 +0000 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-04-20 11:27:21 +0200 |
commit | 7d74d42c79fb2747e42b4d9e2743abbc86a5354c (patch) | |
tree | f8840f79dc05a2862168231d7d6df6390462acc1 /src/dbi.h | |
parent | c2c6ce93b1feecbcc79b4d52cf68823f14e88410 (diff) |
#1042 Update database schema automatically
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.
Diffstat (limited to 'src/dbi.h')
-rw-r--r-- | src/dbi.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -93,4 +93,6 @@ int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer, struct in_addr addr); int og_dbi_add_image(struct og_dbi *dbi, const struct og_image *image); +int og_dbi_schema_update(void); + #endif |