public
Description: Collective Idea's Awesomeness. A collection of useful Rails bits and pieces.
Clone URL: git://github.com/collectiveidea/awesomeness.git
Search Repo:
Click here to lend your support to: awesomeness and make a donation at www.pledgie.com !
remove unused schema task
brandon (author)
Sun Apr 27 14:49:08 -0700 2008
commit  f867c7cad0235639e80b53db8860b6ee94aba7b8
tree    ca992a415b46b3d0815b6510e0b6e45ab9631ee3
parent  2e6835b6f3ae516343c5e14b383af01aceb5a819
...
5
6
7
 
8
9
10
11
12
 
13
14
15
...
18
19
20
21
22
23
24
25
26
27
...
5
6
7
8
9
10
11
12
13
14
15
16
17
...
20
21
22
 
 
 
 
23
24
25
0
@@ -5,11 +5,13 @@ namespace :db do
0
       ENV['BACKUP_DIR'] ||= File.join(RAILS_ROOT, 'backups')
0
     end
0
   
0
+ # Set the VERSION to the latest if it's not set
0
     task :latest do
0
       last = Dir["#{backup_directory}/*/"].sort.last
0
       puts ENV['VERSION'] ||= File.basename(last) if last
0
     end
0
   
0
+ # Setup environment variables for the schema and fixtures tasks
0
     task :setup => :environment do
0
       ENV['VERSION'] ||= Time.now.utc.strftime('%Y%m%d%H%M%S')
0
       backup = File.join(backup_directory, ENV['VERSION'])
0
@@ -18,10 +20,6 @@ namespace :db do
0
       ENV['SCHEMA'] = File.join(backup, 'schema.rb')
0
     end
0
   
0
- task :schema => :setup do
0
- `cp db/schema.rb #{ENV['FIXTURES_DIR']}/`
0
- end
0
-
0
     desc 'Create a new backup of the database'
0
     task :create => [:setup, 'db:fixtures:dump', 'db:schema:dump']
0
   

Comments

    No one has commented yet.