Changeset 818
- Timestamp:
- 04/18/08 16:06:54 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/extensions/import_export/lib/tasks/import_export_extension_tasks.rake
r406 r818 1 1 namespace :db do 2 2 desc "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." 3 task :import => :remigratedo3 task :import => ["db:remigrate", "db:migrate:extensions"] do 4 4 say "ERROR: Specify a template to load with the TEMPLATE environment variable." and exit unless (ENV['TEMPLATE'] and File.exists?(ENV['TEMPLATE'])) or File.exists?("#{RADIANT_ROOT}/db/export.yml") 5 5 … … 9 9 10 10 # Load the data from the export file 11 data = YAML.load_file(ENV['TEMPLATE'] || "#{RA DIANT_ROOT}/db/export.yml")11 data = YAML.load_file(ENV['TEMPLATE'] || "#{RAILS_ROOT}/db/export.yml") 12 12 13 13 # Load the users first so created_by fields can be updated … … 40 40 desc "Export a database template to db/export.yml. Specify the TEMPLATE environment variable to use a different file." 41 41 task :export => :environment do 42 # require 'exporter' 43 template_name = ENV['TEMPLATE'] || "#{RADIANT_ROOT}/db/export.yml" 42 template_name = ENV['TEMPLATE'] || "#{RAILS_ROOT}/db/export.yml" 44 43 File.open(template_name, "w") {|f| f.write Exporter.export } 45 44 end
