-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update awesome with private fields (#93)
* update awesome with private fields * use merged branch
- Loading branch information
1 parent
f1950f7
commit 1243e54
Showing
8 changed files
with
17,959 additions
and
729 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/20240819170610_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
...0240819170611_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 |
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
Oops, something went wrong.