aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/tasks/databases.rake6
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake
index a265d3ef32..f382d97174 100644
--- a/railties/lib/tasks/databases.rake
+++ b/railties/lib/tasks/databases.rake
@@ -17,6 +17,10 @@ namespace :db do
ActiveRecord::Base.establish_connection(config)
when 'postgresql'
`createdb "#{config['database']}" -E utf8`
+ when 'sqlite'
+ `sqlite "#{config['database']}"`
+ when 'sqlite3'
+ `sqlite3 "#{config['database']}"`
end
end
end
@@ -29,7 +33,7 @@ namespace :db do
case config['adapter']
when 'mysql'
ActiveRecord::Base.connection.drop_database config['database']
- when 'sqlite3'
+ when /^sqlite/
FileUtils.rm_f File.join(RAILS_ROOT, config['database'])
when 'postgresql'
`dropdb "#{config['database']}"`