diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-20 21:21:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-20 21:21:41 +0000 |
commit | 101968f3674dfedb0549a54bf6407c287d357f0a (patch) | |
tree | f619811941d11d5b59db39f4d4152759eeacb4a7 /activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | |
parent | 8322ea45c1087325fd428a201749791550bc7859 (diff) | |
download | rails-101968f3674dfedb0549a54bf6407c287d357f0a.tar.gz rails-101968f3674dfedb0549a54bf6407c287d357f0a.tar.bz2 rails-101968f3674dfedb0549a54bf6407c287d357f0a.zip |
Added automatic dropping/creating of test tables for running the unit tests on all databases #587 [adelle@bullet.net.au]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 645e5f6dd4..c637a50c5a 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -102,7 +102,11 @@ module ActiveRecord def quote_column_name(name) return "`#{name}`" end - + + def adapter_name() + 'MySQL' + end + def structure_dump select_all("SHOW TABLES").inject("") do |structure, table| structure += select_one("SHOW CREATE TABLE #{table.to_a.first.last}")["Create Table"] + ";\n\n" |