From 59336490e618570840483c26efe83e1e6e8d16d1 Mon Sep 17 00:00:00 2001 From: AyakorK Date: Thu, 18 Jan 2024 14:43:57 +0100 Subject: [PATCH] fix: Avoid duplicated state --- ...roposals_proposals_proposal_votes_count.decidim_proposals.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20180611124940_add_index_to_decidim_proposals_proposals_proposal_votes_count.decidim_proposals.rb b/db/migrate/20180611124940_add_index_to_decidim_proposals_proposals_proposal_votes_count.decidim_proposals.rb index 5d550f1d..d846f9bb 100644 --- a/db/migrate/20180611124940_add_index_to_decidim_proposals_proposals_proposal_votes_count.decidim_proposals.rb +++ b/db/migrate/20180611124940_add_index_to_decidim_proposals_proposals_proposal_votes_count.decidim_proposals.rb @@ -6,6 +6,6 @@ class AddIndexToDecidimProposalsProposalsProposalVotesCount < ActiveRecord::Migr def change add_index :decidim_proposals_proposals, :proposal_votes_count add_index :decidim_proposals_proposals, :created_at - add_index :decidim_proposals_proposals, :state + add_index :decidim_proposals_proposals, :state unless index_exists?(:decidim_proposals_proposals, :state) end end