<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -97,8 +97,8 @@ module ActiveRecord
 
         yield table_definition
 
-        if options[:force]
-          drop_table(table_name, options) rescue nil
+        if options[:force] &amp;&amp; table_exists?(table_name)
+          drop_table(table_name, options)
         end
 
         create_sql = &quot;CREATE#{' TEMPORARY' if options[:temporary]} TABLE &quot;</diff>
      <filename>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb</filename>
    </modified>
    <modified>
      <diff>@@ -209,6 +209,24 @@ if ActiveRecord::Base.connection.supports_migrations?
       ActiveRecord::Base.primary_key_prefix_type = nil
     end
 
+    uses_mocha('test_create_table_with_force_true_does_not_drop_nonexisting_table') do
+      def test_create_table_with_force_true_does_not_drop_nonexisting_table
+        if Person.connection.table_exists?(:testings2)
+          Person.connection.drop_table :testings2
+        end
+
+        # using a copy as we need the drop_table method to
+        # continue to work for the ensure block of the test
+        temp_conn = Person.connection.dup
+        temp_conn.expects(:drop_table).never
+        temp_conn.create_table :testings2, :force =&gt; true do |t|
+          t.column :foo, :string
+        end
+      ensure
+        Person.connection.drop_table :testings2 rescue nil
+      end
+    end
+
 
     # SQL Server, Sybase, and SQLite3 will not allow you to add a NOT NULL
     # column to a table without a default value.</diff>
      <filename>activerecord/test/cases/migration_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8877ab5852d9a1133eb9a730ae47dde214bafe55</id>
    </parent>
  </parents>
  <author>
    <name>Tarmo T&#228;nav</name>
    <email>tarmo@itech.ee</email>
  </author>
  <url>http://github.com/aslakhellesoy/rails/commit/0a21193dc660396fb993b06d1d3c168a9cd900a5</url>
  <id>0a21193dc660396fb993b06d1d3c168a9cd900a5</id>
  <committed-date>2008-05-06T18:01:46-07:00</committed-date>
  <authored-date>2008-05-06T16:08:57-07:00</authored-date>
  <message>create_table :force =&gt; true no longer tries to drop a non-existing table

Signed-off-by: Michael Koziarski &lt;michael@koziarski.com&gt;</message>
  <tree>2e1cff75eefe09a019bd25f3bbec9975ffb8c032</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
