Update auth/initialize_database.rb

This commit is contained in:
joseph 2023-12-17 21:40:45 +00:00
parent f02c071911
commit 61bc30a679
1 changed files with 66 additions and 64 deletions

View File

@ -10,6 +10,8 @@ def initialize_database
unless File.directory?(DATA_LOCATION) unless File.directory?(DATA_LOCATION)
Dir.mkdir(DATA_LOCATION) Dir.mkdir(DATA_LOCATION)
puts "Directory '#{DATA_LOCATION}' created successfully."
end
unless File.directory?(database_path) unless File.directory?(database_path)
Dir.mkdir(database_path) Dir.mkdir(database_path)
@ -20,7 +22,7 @@ def initialize_database
Dir.mkdir(file_path) Dir.mkdir(file_path)
puts "Directory '#{file_path}' created successfully." puts "Directory '#{file_path}' created successfully."
end end
end
db = SQLite3::Database.new( DATA_LOCATION + DATABASE_SUBPATH + DATABASE_NAME )#'./database/auth.db') db = SQLite3::Database.new( DATA_LOCATION + DATABASE_SUBPATH + DATABASE_NAME )#'./database/auth.db')