-
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.
- Loading branch information
1 parent
8253c86
commit da43562
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
db/migrate/20231127111725_create_decidim_awesome_vote_weights.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,14 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20231006113837) | ||
|
||
class CreateDecidimAwesomeVoteWeights < ActiveRecord::Migration[6.0] | ||
def change | ||
create_table :decidim_awesome_vote_weights do |t| | ||
# this might be polymorphic in the future (if other types of votes are supported) | ||
t.references :proposal_vote, null: false, index: { name: "decidim_awesome_proposals_weights_vote" } | ||
|
||
t.integer :weight, null: false, default: 1 | ||
t.timestamps | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
...te/20231127111726_create_decidim_awesome_proposal_extra_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,15 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20231006113841) | ||
|
||
class CreateDecidimAwesomeProposalExtraFields < ActiveRecord::Migration[6.0] | ||
def change | ||
create_table :decidim_awesome_proposal_extra_fields do |t| | ||
# this might be polymorphic in the future (if other types of votes are supported) | ||
t.references :decidim_proposal, null: false, index: { name: "decidim_awesome_extra_fields_on_proposal" } | ||
|
||
t.jsonb :vote_weight_totals | ||
t.integer :weight_total, default: 0 | ||
t.timestamps | ||
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