diff options
Diffstat (limited to 'activerecord/lib/active_record/tasks/sqlite_database_tasks.rb')
-rw-r--r-- | activerecord/lib/active_record/tasks/sqlite_database_tasks.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb new file mode 100644 index 0000000000..882a4f98a9 --- /dev/null +++ b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb @@ -0,0 +1,19 @@ +class ActiveRecord::Tasks::SQLiteDatabaseTasks + def initialize(configuration) + @configuration = configuration + end + + def create + if File.exist?(configuration['database']) + $stderr.puts "#{configuration['database']} already exists" + return + end + + ActiveRecord::Base.establish_connection(configuration) + ActiveRecord::Base.connection + end + + private + + attr_reader :configuration +end |