Skip to content

Commit 6a47db9

Browse files
committed
Add migrations
1 parent f533f22 commit 6a47db9

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# frozen_string_literal: true
2+
3+
# This migration comes from decidim_stratified_sortitions (originally 20251023103900)
4+
class CreateDecidimStratifiedSortitionsStratifiedSortitions < ActiveRecord::Migration[5.2]
5+
def change
6+
create_table :decidim_stratified_sortitions_stratified_sortitions do |t|
7+
t.jsonb :title
8+
t.integer :num_candidates, null: false
9+
t.jsonb :description
10+
t.jsonb :selection_criteria
11+
t.jsonb :selected_profiles_description
12+
t.references :decidim_component, index: false, null: false
13+
14+
t.timestamps
15+
end
16+
17+
add_index :decidim_stratified_sortitions_stratified_sortitions, :decidim_component_id, name: "index_decidim_stratified_sortitions_component_id"
18+
end
19+
end

db/schema.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.0].define(version: 2025_11_24_084828) do
13+
ActiveRecord::Schema[7.0].define(version: 2025_12_15_113051) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "ltree"
1616
enable_extension "pg_trgm"
@@ -1559,6 +1559,18 @@
15591559
t.index ["topic_id"], name: "index_decidim_static_pages_on_topic_id"
15601560
end
15611561

1562+
create_table "decidim_stratified_sortitions_stratified_sortitions", force: :cascade do |t|
1563+
t.jsonb "title"
1564+
t.integer "num_candidates", null: false
1565+
t.jsonb "description"
1566+
t.jsonb "selection_criteria"
1567+
t.jsonb "selected_profiles_description"
1568+
t.bigint "decidim_component_id", null: false
1569+
t.datetime "created_at", precision: nil, null: false
1570+
t.datetime "updated_at", precision: nil, null: false
1571+
t.index ["decidim_component_id"], name: "index_decidim_stratified_sortitions_component_id"
1572+
end
1573+
15621574
create_table "decidim_surveys_surveys", id: :serial, force: :cascade do |t|
15631575
t.integer "decidim_component_id"
15641576
t.datetime "created_at", precision: nil, null: false

0 commit comments

Comments
 (0)