Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 13229:bb7177efbf41
plugins: Use boolean config method in some places
Because it makes sense and improves feedback via logging
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 18 Jul 2023 12:38:16 +0200 |
parent | 13223:b88b3e414550 |
child | 13241:0419de4e4db1 |
comparison
equal
deleted
inserted
replaced
13228:616c578c644f | 13229:bb7177efbf41 |
---|---|
906 local db_uri = sql.db2uri(params); | 906 local db_uri = sql.db2uri(params); |
907 engine = engines[db_uri]; | 907 engine = engines[db_uri]; |
908 if not engine then | 908 if not engine then |
909 module:log("debug", "Creating new engine %s", db_uri); | 909 module:log("debug", "Creating new engine %s", db_uri); |
910 engine = sql:create_engine(params, function (engine) -- luacheck: ignore 431/engine | 910 engine = sql:create_engine(params, function (engine) -- luacheck: ignore 431/engine |
911 if module:get_option("sql_manage_tables", true) then | 911 if module:get_option_boolean("sql_manage_tables", true) then |
912 -- Automatically create table, ignore failure (table probably already exists) | 912 -- Automatically create table, ignore failure (table probably already exists) |
913 -- FIXME: we should check in information_schema, etc. | 913 -- FIXME: we should check in information_schema, etc. |
914 create_table(engine); | 914 create_table(engine); |
915 -- Check whether the table needs upgrading | 915 -- Check whether the table needs upgrading |
916 if upgrade_table(engine, params, false) then | 916 if upgrade_table(engine, params, false) then |