Commit 30c44b42 authored by James S's avatar James S Committed by GitHub

Merge pull request #7 from lighthouse-labs/db-config-keys

Update db config to fix db:create/db:drop
parents 526c9ebe 9caf0cf9
require 'rake'
require "sinatra/activerecord/rake"
require ::File.expand_path('../config/environment', __FILE__)
desc 'Retrieves the current schema version number'
task "db:version" do
puts "Current version: #{ActiveRecord::Migrator.current_version}"
namespace :db do
task :load_config do
require ::File.expand_path('../config/environment', __FILE__)
end
desc 'Retrieves the current schema version number'
task :version do
puts "Current version: #{ActiveRecord::Migrator.current_version}"
end
end
......@@ -5,8 +5,14 @@ end
configure :development, :test do
set :database, {
adapter: 'sqlite3',
database: APP_ROOT.join('db', "#{Sinatra::Application.environment}.sqlite3")
'development' => {
'adapter' => 'sqlite3',
'database' => APP_ROOT.join('db', 'development.sqlite3')
},
'test' => {
'adapter' => 'sqlite3',
'database' => APP_ROOT.join('db', 'test.sqlite3')
}
}
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment