1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

M #-: add default sqlite3 database path ()

This commit is contained in:
Alejandro Huertas Herrero 2020-06-02 18:43:02 +02:00 committed by GitHub
parent 2d634f7168
commit 90d185dd08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,14 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
ONE_LOCATION = ENV['ONE_LOCATION']
if !ONE_LOCATION
SQLITE_PATH = '/var/lib/one/one.db'
else
SQLITE_PATH = ONE_LOCATION + '/var/one.db'
end
require 'onedb_backend'
# If set to true, extra verbose time log will be printed for each migrator
@ -33,6 +41,8 @@ class OneDB
end
if ops[:backend] == :sqlite
ops[:sqlite] = SQLITE_PATH if ops[:sqlite].nil?
begin
require 'sqlite3'
rescue LoadError