* Denormalized post versions. Testing has shown it reduces the size
of the table 66%.
This commit is contained in:
16
db/migrate/20100205163027_create_post_histories.rb
Normal file
16
db/migrate/20100205163027_create_post_histories.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreatePostHistories < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :post_histories do |t|
|
||||
t.timestamps
|
||||
|
||||
t.column :post_id, :integer, :null => false
|
||||
t.column :revisions, :text, :null => false
|
||||
end
|
||||
|
||||
add_index :post_histories, :post_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :post_histories
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user