-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump: Decidim-Awesome to last commit (#607)
* feat: Bump decidim-awesome to last commit * fix: Fix migration that has been changed since first implementation
- Loading branch information
Showing
7 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ate/20241009105926_add_decidim_awesome_proposal_private_fields.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20240531224204) | ||
|
||
class AddDecidimAwesomeProposalPrivateFields < ActiveRecord::Migration[6.0] | ||
class ProposalExtraField < ApplicationRecord | ||
self.table_name = :decidim_awesome_proposal_extra_fields | ||
end | ||
|
||
def change | ||
add_column :decidim_awesome_proposal_extra_fields, :private_body, :string | ||
add_column :decidim_awesome_proposal_extra_fields, :decidim_proposal_type, :string | ||
reversible do |direction| | ||
direction.up do | ||
execute <<~SQL.squish | ||
UPDATE decidim_awesome_proposal_extra_fields | ||
SET decidim_proposal_type = 'Decidim::Proposals::Proposal' | ||
SQL | ||
end | ||
end | ||
|
||
remove_index :decidim_awesome_proposal_extra_fields, name: "decidim_awesome_extra_fields_on_proposal" | ||
add_index :decidim_awesome_proposal_extra_fields, | ||
[:decidim_proposal_id, :decidim_proposal_type], | ||
name: "index_decidim_awesome_proposal_extra_fields_on_decidim_proposal" | ||
|
||
change_column_null :decidim_awesome_proposal_extra_fields, :decidim_proposal_id, false | ||
change_column_null :decidim_awesome_proposal_extra_fields, :decidim_proposal_type, false | ||
ProposalExtraField.reset_column_information | ||
end | ||
end |
21 changes: 21 additions & 0 deletions
21
...0241009105927_add_decidim_awesome_proposal_private_fields_date.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20240729164227) | ||
|
||
class AddDecidimAwesomeProposalPrivateFieldsDate < ActiveRecord::Migration[6.0] | ||
class ProposalExtraField < ApplicationRecord | ||
self.table_name = :decidim_awesome_proposal_extra_fields | ||
end | ||
|
||
def change | ||
add_column :decidim_awesome_proposal_extra_fields, :private_body_updated_at, :datetime | ||
|
||
reversible do |direction| | ||
direction.up do | ||
execute <<~SQL.squish | ||
UPDATE decidim_awesome_proposal_extra_fields | ||
SET private_body_updated_at = updated_at | ||
SQL | ||
end | ||
end | ||
end | ||
end |
3 changes: 2 additions & 1 deletion
3
...ix_reference_for_all_resources.decidim.rb → ...ix_reference_for_all_resources.decidim.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters