Don't index on just hidden
This commit is contained in:
parent
bb4c2ee85d
commit
435b16b30a
5 changed files with 18 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ class AddHiddenToPostVisibilities < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
def self.down
|
||||
add_index :post_visibilities, :hidden
|
||||
remove_index :post_visibilities, :hidden
|
||||
remove_column :post_visibilities, :hidden
|
||||
end
|
||||
end
|
||||
|
|
|
|||
12
db/migrate/20110331004720_add_hidden_indicies.rb
Normal file
12
db/migrate/20110331004720_add_hidden_indicies.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class AddHiddenIndicies < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_index :post_visibilities, :hidden
|
||||
add_index :post_visibilities, [:post_id, :hidden, :contact_id], :unique => true
|
||||
end
|
||||
|
||||
|
||||
def self.down
|
||||
remove_index :post_visibilities, :column => [:post_id, :hidden, :contact_id]
|
||||
add_index :post_visibilities, :hidden
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110330230206) do
|
||||
ActiveRecord::Schema.define(:version => 20110331004720) do
|
||||
|
||||
create_table "aspect_memberships", :force => true do |t|
|
||||
t.integer "aspect_id", :null => false
|
||||
|
|
@ -221,7 +221,7 @@ ActiveRecord::Schema.define(:version => 20110330230206) do
|
|||
|
||||
add_index "post_visibilities", ["contact_id", "post_id"], :name => "index_post_visibilities_on_contact_id_and_post_id", :unique => true
|
||||
add_index "post_visibilities", ["contact_id"], :name => "index_post_visibilities_on_contact_id"
|
||||
add_index "post_visibilities", ["hidden"], :name => "index_post_visibilities_on_hidden"
|
||||
add_index "post_visibilities", ["post_id", "hidden", "contact_id"], :name => "index_post_visibilities_on_post_id_and_hidden_and_contact_id", :unique => true
|
||||
add_index "post_visibilities", ["post_id"], :name => "index_post_visibilities_on_post_id"
|
||||
|
||||
create_table "posts", :force => true do |t|
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
module Diaspora
|
||||
module Taggable
|
||||
VALID_TAG_BODY = /[^_\s#*\[\]()\:\@\/"'\.%]+/
|
||||
|
||||
VALID_TAG_BODY = /[^_,\s#*\[\]()\:\@\/"'\.%]+/
|
||||
|
||||
def self.included(model)
|
||||
model.class_eval do
|
||||
cattr_accessor :field_with_tags
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ describe ConversationsController do
|
|||
sign_in :user, eve
|
||||
|
||||
get :show, :id => @conversation.id
|
||||
response.code.should == '302'
|
||||
response.code.should redirect_to conversations_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue