Skip to content

Commit

Permalink
Add pending decidim_awesome migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
entantoencuanto committed Jul 17, 2024
1 parent ff239f1 commit edb5188
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
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
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
19 changes: 18 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_07_12_100257) do
ActiveRecord::Schema.define(version: 2024_07_17_093516) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -323,6 +323,23 @@
t.index ["decidim_organization_id"], name: "decidim_awesome_editor_images_constraint_organization"
end

create_table "decidim_awesome_proposal_extra_fields", force: :cascade do |t|
t.bigint "decidim_proposal_id", null: false
t.jsonb "vote_weight_totals"
t.integer "weight_total", default: 0
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["decidim_proposal_id"], name: "decidim_awesome_extra_fields_on_proposal"
end

create_table "decidim_awesome_vote_weights", force: :cascade do |t|
t.bigint "proposal_vote_id", null: false
t.integer "weight", default: 1, null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["proposal_vote_id"], name: "decidim_awesome_proposals_weights_vote"
end

create_table "decidim_blogs_posts", id: :serial, force: :cascade do |t|
t.jsonb "title"
t.jsonb "body"
Expand Down

0 comments on commit edb5188

Please sign in to comment.