Commit 8edfc4faef76b553f78162511f11dfff3b9d22e4
- Date: Sun Apr 27 20:36:13 +0000 2008
- Committer: Johan Sørensen (johan@johansorensen.com)
- Author: Johan Sørensen (johan@johansorensen.com)
- Commit SHA1: 8edfc4faef76b553f78162511f11dfff3b9d22e4
- Tree SHA1: 512c2fce96c97f40905117b2f9f01d490e76910d
add indexes to cloners table
Commit diff
| |   |
| 1 | class AddIndexesToCloners < ActiveRecord::Migration |
| 2 | def self.up |
| 3 | add_index :cloners, :repository_id |
| 4 | add_index :cloners, :date |
| 5 | add_index :cloners, :ip |
| 6 | end |
| 7 | |
| 8 | def self.down |
| 9 | remove_index :cloners, :repository_id |
| 10 | remove_index :cloners, :date |
| 11 | remove_index :cloners, :ip |
| 12 | end |
| 13 | end |
| toggle raw diff |
--- /dev/null
+++ b/db/migrate/026_add_indexes_to_cloners.rb
@@ -0,0 +1,13 @@
+class AddIndexesToCloners < ActiveRecord::Migration
+ def self.up
+ add_index :cloners, :repository_id
+ add_index :cloners, :date
+ add_index :cloners, :ip
+ end
+
+ def self.down
+ remove_index :cloners, :repository_id
+ remove_index :cloners, :date
+ remove_index :cloners, :ip
+ end
+end |