forked from e621ng/e621ng
fix pool version ordering
This commit is contained in:
parent
9af5959629
commit
d7fb091bd1
@ -1,6 +1,6 @@
|
||||
class PoolVersionsController < ApplicationController
|
||||
def index
|
||||
@search = PoolVersion.search(params[:search])
|
||||
@pool_versions = @search.order("id desc").paginate(params[:page])
|
||||
@pool_versions = @search.order("updated_at desc").paginate(params[:page])
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,11 @@
|
||||
class AddIndexUpdatedAtOnPoolVersions < ActiveRecord::Migration
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_index :post_versions, :updated_at
|
||||
end
|
||||
|
||||
def down
|
||||
execute "set statement_timeout = 0"
|
||||
remove_index :post_versions, :updated_at
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user