public
Fork of trevorturk/el-dorado
Description: Localized version of El Dorado using Gibberish. Dutch language included.
Homepage: http://almosteffortless.com/eldorado/
Clone URL: git://github.com/jxl/el-dorado.git
Search Repo:
migration fixes
jxl (author)
Sun May 04 04:01:01 -0700 2008
commit  77a5fd6c4d494cc3ee2fe84f1ba1e4684a710ab7
tree    e9550e118adb193bb4cd65d8d3fe1b9898cd528b
parent  a672b50a1e3b07a0b8e8b841dde94366beca5b3c
...
1
2
 
3
4
5
...
1
2
3
4
5
6
0
@@ -1,5 +1,6 @@
0
 class RemoveCachedPostInfoFromForum < ActiveRecord::Migration
0
   def self.up
0
+ remove_index :forums, :name => :index_forums_on_last_post_at
0
     remove_column :forums, :last_post_id
0
     remove_column :forums, :last_post_at
0
     remove_column :forums, :last_post_by
...
3
4
5
6
7
8
 
 
 
 
 
 
9
10
11
...
3
4
5
 
 
 
6
7
8
9
10
11
12
13
14
0
@@ -3,9 +3,12 @@
0
     add_column :users, :ban_message, :string
0
     add_column :users, :banned_until, :datetime
0
     
0
- @bans = Ban.find(:all)
0
- @bans.each do |ban|
0
- User.update_all(['ban_message = ?, banned_until = ?', ban.message, ban.expires_at], ['id = ?', ban.user_id])
0
+ begin
0
+ @bans = Ban.find(:all)
0
+ @bans.each do |ban|
0
+ User.update_all(['ban_message = ?, banned_until = ?', ban.message, ban.expires_at], ['id = ?', ban.user_id])
0
+ end
0
+ rescue
0
     end
0
     
0
     drop_table :bans
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 class FixIndexes < ActiveRecord::Migration
0
   def self.up
0
     remove_index :forums, :name => :index_forums_on_category_id
0
- remove_index :forums, :name => :index_forums_on_last_post_at
0
+ remove_index :forums, :name => :index_forums_on_last_post_at rescue nil
0
     remove_index :posts, :name => :index_posts_on_topic_id
0
     remove_index :topics, :name => :index_topics_on_forum_id
0
     remove_index :topics, :name => :index_topics_on_last_post_at
...
27
28
29
30
 
31
32
33
34
35
36
37
 
38
39
40
41
...
94
95
96
97
98
 
99
100
101
102
103
...
142
143
144
145
 
146
147
148
149
150
151
 
152
153
154
155
...
168
169
170
171
172
 
 
173
174
 
175
176
177
...
181
182
183
184
 
185
186
187
...
27
28
29
 
30
31
32
33
34
35
36
 
37
38
39
40
41
...
94
95
96
 
97
98
99
100
101
102
103
...
142
143
144
 
145
146
147
148
149
 
150
151
152
153
154
155
...
168
169
170
 
 
171
172
173
 
174
175
176
177
...
181
182
183
 
184
185
186
187
0
@@ -27,14 +27,14 @@
0
 
0
   create_table "categories", :force => true do |t|
0
     t.string "name"
0
- t.integer "position", :, :default => 0
0
+ t.integer "position", :limit => 255, :default => 0
0
   end
0
 
0
   create_table "events", :force => true do |t|
0
     t.string "title"
0
     t.text "description"
0
     t.datetime "date"
0
- t.boolean "reminder"
0
+ t.boolean "reminder", :default => false
0
     t.integer "user_id"
0
     t.datetime "created_at"
0
     t.datetime "updated_at"
0
0
@@ -94,8 +94,8 @@
0
     t.integer "updated_by"
0
   end
0
 
0
- add_index "posts", ["user_id", "created_at"], :name => "index_posts_on_user_id"
0
   add_index "posts", ["topic_id", "created_at"], :name => "index_posts_on_topic_id_and_created_at"
0
+ add_index "posts", ["user_id", "created_at"], :name => "index_posts_on_user_id"
0
 
0
   create_table "ranks", :force => true do |t|
0
     t.string "title"
0
0
0
@@ -142,13 +142,13 @@
0
     t.integer "last_post_id"
0
     t.datetime "last_post_at"
0
     t.integer "last_post_by"
0
- t.boolean "locked"
0
+ t.boolean "locked", :default => false
0
     t.boolean "sticky", :default => false
0
     t.integer "forum_id"
0
   end
0
 
0
- add_index "topics", ["forum_id", "last_post_at"], :name => "index_topics_on_forum_id_and_last_post_at"
0
   add_index "topics", ["forum_id", "sticky", "last_post_at"], :name => "index_topics_on_sticky_and_last_post_at"
0
+ add_index "topics", ["forum_id", "last_post_at"], :name => "index_topics_on_forum_id_and_last_post_at"
0
 
0
   create_table "uploads", :force => true do |t|
0
     t.integer "parent_id"
0
0
@@ -168,10 +168,10 @@
0
     t.string "email"
0
     t.string "password_hash"
0
     t.datetime "created_at"
0
- t.boolean "admin", :default => false
0
- t.integer "posts_count", :default => 0
0
+ t.boolean "admin", :default => false
0
+ t.integer "posts_count", :default => 0
0
     t.string "signature"
0
- t.text "bio"
0
+ t.text "bio", :limit => 255
0
     t.datetime "profile_updated_at"
0
     t.datetime "online_at"
0
     t.string "avatar"
0
@@ -181,7 +181,7 @@
0
     t.string "ban_message"
0
     t.datetime "banned_until"
0
     t.datetime "chatting_at"
0
- t.boolean "logged_out", :default => false
0
+ t.boolean "logged_out", :default => false
0
     t.string "language"
0
   end
0
 

Comments

    No one has commented yet.