<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,13 +8,19 @@ namespace :db do
 
   desc &quot;Build database tables based on model defined proterties&quot;
   task :create do
-    DataMapper::Persistence.auto_migrate!
+    DataMapper.auto_migrate!
   end
 
   desc &quot;Clears all database tables&quot;
   task :drop do
-    DataMapper::Persistence.drop_all_tables!
+    # A horrendous and ugly piece of code. 
+    # Why did they get rid of DataMapper::Persistence.drop_all_tables! ?
+    repo = repository(:default)
+    ObjectSpace.each_object(Class) do |c|
+      repo.adapter.destroy_model_storage(repo,c) if c.include? DataMapper::Resource
+    end 
   end
+
 end
 
 desc &quot;Rebuilds the project from scratch&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>226bbc7fc23e4fdd9b14f1a825c0365e8571126d</id>
    </parent>
  </parents>
  <author>
    <name>Michael Barton</name>
    <email>mail@michaelbarton.me.uk</email>
  </author>
  <url>http://github.com/michaelbarton/organised_experiments/commit/47bfcfb397190e69caf3da26be03327edd4967e7</url>
  <id>47bfcfb397190e69caf3da26be03327edd4967e7</id>
  <committed-date>2008-07-25T10:10:52-07:00</committed-date>
  <authored-date>2008-07-25T10:10:52-07:00</authored-date>
  <message>Updated drop and create methods for new DataMapper API. Implemented hideous drop method, as DM removed drop_all_tables!</message>
  <tree>a1e332904500e0367b7a09a669bb0cbb4f720e8b</tree>
  <committer>
    <name>Michael Barton</name>
    <email>mail@michaelbarton.me.uk</email>
  </committer>
</commit>
