Sha256: e2b08e688a0a471d6c8b951675a5ace700f8a45615e7d3ade03753c65d02a2d9
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
namespace :db do desc "Migrate schema to version 0 and back up again. WARNING: Destroys all data in tables!!" task :remigrate => :environment do require 'highline/import' if ENV['OVERWRITE'].to_s.downcase == 'true' or agree("This task will destroy any data in the database. Are you sure you want to \ncontinue? [yn] ") # Migrate downward ActiveRecord::Migrator.migrate("#{RADIANT_ROOT}/db/migrate/", 0) # Migrate upward Rake::Task["db:migrate"].invoke # Dump the schema Rake::Task["db:schema:dump"].invoke else say "Task cancelled." exit end end desc "Bootstrap your database for Radiant." task :bootstrap => :remigrate do require 'radiant/setup' Radiant::Setup.bootstrap( :admin_name => ENV['ADMIN_NAME'], :admin_username => ENV['ADMIN_USERNAME'], :admin_password => ENV['ADMIN_PASSWORD'], :database_template => ENV['DATABASE_TEMPLATE'] ) Rake::Task['db:migrate:extensions'].invoke Rake::Task['radiant:extensions:update_all'].invoke end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-1.0.0.rc2 | lib/tasks/database.rake |
radiant-1.0.0.rc1 | lib/tasks/database.rake |