Added docs for #drop_database on MySQL adapter

This commit is contained in:
Sebastian Martinez
2011-04-22 19:44:30 -03:00
parent 3050497a54
commit 1a7737353f
2 changed files with 5 additions and 1 deletions

View File

@@ -563,6 +563,10 @@ module ActiveRecord
end
end
# Drops a MySQL database.
#
# Example:
# drop_database 'sebastian_development'
def drop_database(name) #:nodoc:
execute "DROP DATABASE IF EXISTS `#{name}`"
end

View File

@@ -643,7 +643,7 @@ module ActiveRecord
execute "CREATE DATABASE #{quote_table_name(name)}#{option_string}"
end
# Drops a PostgreSQL database
# Drops a PostgreSQL database.
#
# Example:
# drop_database 'matt_development'