public
Description: OneBody is web-based software that connects community members, especially churches, on the web.
Homepage: http://beonebody.com
Clone URL: git://github.com/seven1m/onebody.git
Fixed bug breaking clean run of migrations.
MySQL install cap task now set MySQL root password.
Tim Morgan (author)
Thu Aug 14 06:14:00 -0700 2008
commit  f4794ec8d4dc217ea765ab353751f6664cefe856
tree    56480ef915251ffc8c484ea3f30da21e8cd07dec
parent  9e6ac58c9dbacb204f222caa4d5033494b51e07e
...
1
2
3
4
 
5
6
7
8
9
10
11
12
13
...
1
2
3
 
4
5
6
7
8
 
 
 
9
10
0
@@ -1,13 +1,10 @@
0
 class RenameLogItemChanges < ActiveRecord::Migration
0
   def self.up
0
     change_table :log_items do |t|
0
-      t.rename :changes, :object_changes
0
+      t.rename :changes, :object_changes rescue nil
0
     end
0
   end
0
 
0
   def self.down
0
-    change_table :log_items do |t|
0
-      t.rename :object_changes, :changes
0
-    end
0
   end
0
 end
...
5
6
7
8
 
9
10
11
...
5
6
7
 
8
9
10
11
0
@@ -5,7 +5,7 @@ class Capistrano::Configuration
0
   end
0
   
0
   def get_db_password
0
-    @db_password ||= HighLine.new.ask('Password to use for the "onebody" MySQL user: ')
0
+    @db_password ||= HighLine.new.ask('Password to use for the "onebody" MySQL user: ') { |q| q.echo = false }
0
   end
0
   
0
   def run_and_return(cmd)
...
79
80
81
 
 
82
83
84
...
79
80
81
82
83
84
85
86
0
@@ -79,6 +79,8 @@ namespace :deploy do
0
     task :mysql, :roles => :db do
0
       sudo 'aptitude update'
0
       sudo 'aptitude install -y mysql-server libmysql-ruby1.8'
0
+      password = HighLine.new.ask('Password for MySQL root user: ') { |q| q.echo = false }
0
+      run 'mysqladmin -uroot password #{password}'
0
     end
0
     
0
     desc 'Install Postfix'

Comments