Fix index detection a migration to revert index change (#8026)
This commit is contained in:
		
							parent
							
								
									eb483eef76
								
							
						
					
					
						commit
						eff09fbdff
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -5,7 +5,7 @@ class RevertIndexChangeOnStatusesForApiV1AccountsAccountIdStatuses < ActiveRecor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def change
 | 
					  def change
 | 
				
			||||||
    safety_assured do
 | 
					    safety_assured do
 | 
				
			||||||
      add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 unless index_exists?(:statuses, name: "index_statuses_20180106")
 | 
					      add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 unless index_name_exists?(:statuses, "index_statuses_20180106")
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # These index may not exists (see migration 20180514130000)
 | 
					    # These index may not exists (see migration 20180514130000)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue