<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,9 @@
 namespace :db do
   desc &quot;Import a database template from db/export.yml. Specify the TEMPLATE environment variable to load a different template. This is not intended for new installations, but restoration from previous exports.&quot;
-  task :import =&gt; [&quot;db:schema:load&quot;] do
+  task :import do
     require 'highline/import'
-    say &quot;ERROR: Specify a template to load with the TEMPLATE environment variable.&quot; and exit unless (ENV['TEMPLATE'] and File.exists?(ENV['TEMPLATE'])) or File.exists?(&quot;#{RADIANT_ROOT}/db/export.yml&quot;)
-    
+    say &quot;ERROR: Specify a template to load with the TEMPLATE environment variable.&quot; and exit unless (ENV['TEMPLATE'] and File.exists?(ENV['TEMPLATE']))
+    Rake::Task[&quot;db:schema:load&quot;].invoke
     # Use what Radiant::Setup for the heavy lifting
     require 'radiant/setup'
     require 'lib/radiant_setup_create_records_patch'
@@ -43,9 +43,9 @@ namespace :db do
     setup.send :create_records, data
   end
   
-  desc &quot;Export a database template to db/export.yml. Specify the TEMPLATE environment variable to use a different file.&quot;
+  desc &quot;Export a database template to db/export_TIME.yml. Specify the TEMPLATE environment variable to use a different file.&quot;
   task :export =&gt; [&quot;db:schema:dump&quot;] do
-    template_name = ENV['TEMPLATE'] || &quot;#{RAILS_ROOT}/db/export.yml&quot;
+    template_name = ENV['TEMPLATE'] || &quot;#{RAILS_ROOT}/db/export_#{Time.now.utc.strftime(&quot;%Y%m%d%H%M%S&quot;)}.yml&quot;
     File.open(template_name, &quot;w&quot;) {|f| f.write Exporter.export }
   end
 end
\ No newline at end of file</diff>
      <filename>lib/tasks/import_export_extension_tasks.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>01bd536ec1085452f48417c1e24eb76f5cf5b619</id>
    </parent>
  </parents>
  <author>
    <name>Petrik</name>
    <email>petrik@deheus.net</email>
  </author>
  <url>http://github.com/radiant/radiant-import-export-extension/commit/fafc57b1c503485b416aa880edf3b6ff896c12fd</url>
  <id>fafc57b1c503485b416aa880edf3b6ff896c12fd</id>
  <committed-date>2009-04-14T04:55:49-07:00</committed-date>
  <authored-date>2009-03-30T08:01:32-07:00</authored-date>
  <message>Changes to prevent accidentally deleting the database: db:import fails if a TEMPLATE string isn't supplied (import requires you to be specific export doesn't). The failure now also occurs before the db:schema:load task is called preventing the deletion of data if an incorrect TEMPLATE agrument is passed (when you accidentally use import instead of export). The auto generated export filename now also has a migration style timestamp (db/export_20090330113736.yml)

Signed-off-by: Sean Cribbs &lt;seancribbs@gmail.com&gt;</message>
  <tree>fd7bed07095d294d2e011c7587706cfd70c26723</tree>
  <committer>
    <name>Sean Cribbs</name>
    <email>seancribbs@gmail.com</email>
  </committer>
</commit>
