add pixiv id search

This commit is contained in:
albert
2013-03-31 14:43:54 -04:00
parent fc32a0023c
commit e2c2a8309d
7 changed files with 55 additions and 15 deletions

View File

@@ -0,0 +1,12 @@
class AddPixivIdToPosts < ActiveRecord::Migration
def up
execute "set statement_timeout = 0"
add_column :posts, :pixiv_id, :integer
execute "create index index_posts_on_pixiv_id on posts (pixiv_id) where pixiv_id is not null"
end
def down
execute "set statement_timeout = 0"
remove_column :posts, :pixiv_id
end
end