-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump decidim-decidim_awesome from 0.11.0 to 0.11.1 (#8)
* Bump decidim-decidim_awesome from 0.11.0 to 0.11.1 * Correct schema.rb
- Loading branch information
Showing
5 changed files
with
66 additions
and
15 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/20240906160615_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
...0240906160616_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.1] | ||
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.