Files
danbooru/db/migrate/20100211025616_create_pools.rb
albert 49b3d43ddd * meta_search now pulls directly from GitHub
* Updated gems
* [inprogress] New pagination helpers used instead of pagination presenters
* [inprogress] Favorites refactored to use ActiveRecord
* [inprogress] PostSets refactored to use a decorator/dependency injection pattern
* [inprogress] Made pool/post interaction more robust
* Pool#posts now returns an ActiveRelation object
* Fixed unit tests
2011-06-07 17:34:09 -04:00

21 lines
558 B
Ruby

class CreatePools < ActiveRecord::Migration
def self.up
create_table :pools do |t|
t.column :name, :string
t.column :creator_id, :integer, :null => false
t.column :description, :text
t.column :is_active, :boolean, :null => false, :default => true
t.column :post_ids, :text, :null => false, :default => ""
t.column :post_count, :integer, :null => false, :default => 0
t.timestamps
end
add_index :pools, :name
add_index :pools, :creator_id
end
def self.down
drop_table :pools
end
end