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,18 +10,20 @@ def initialize_database
unless File.directory?(DATA_LOCATION)
Dir.mkdir(DATA_LOCATION)
unless File.directory?(database_path)
Dir.mkdir(database_path)
puts "Directory '#{database_path}' created successfully."
end
unless File.directory?(file_path)
Dir.mkdir(file_path)
puts "Directory '#{file_path}' created successfully."
end
puts "Directory '#{DATA_LOCATION}' created successfully."
end
unless File.directory?(database_path)
Dir.mkdir(database_path)
puts "Directory '#{database_path}' created successfully."
end
unless File.directory?(file_path)
Dir.mkdir(file_path)
puts "Directory '#{file_path}' created successfully."
end
db = SQLite3::Database.new( DATA_LOCATION + DATABASE_SUBPATH + DATABASE_NAME )#'./database/auth.db')
puts 'Creating tables if necessary.'