mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
M #-: add default sqlite3 database path (#4870)
This commit is contained in:
parent
2d634f7168
commit
90d185dd08
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user