Skip to content

Commit 780afe4

Browse files
committed
Backfill has_summary_record NULL values to false
1 parent f11dc19 commit 780afe4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class BackfillHasSummaryRecordDefault < ActiveRecord::Migration[7.0]
2+
def change
3+
execute <<-SQL.squish
4+
UPDATE decidim_participatory_processes
5+
SET has_summary_record = false
6+
WHERE has_summary_record IS NULL
7+
SQL
8+
9+
change_column_null :decidim_participatory_processes, :has_summary_record, false, false
10+
end
11+
end

db/schema.rb

Lines changed: 2 additions & 2 deletions
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: 2026_01_20_111521) do
13+
ActiveRecord::Schema[7.0].define(version: 2026_03_16_160034) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "ltree"
1616
enable_extension "pg_trgm"
@@ -1161,7 +1161,7 @@
11611161
t.boolean "private_space", default: false
11621162
t.bigint "decidim_area_id"
11631163
t.decimal "cost"
1164-
t.boolean "has_summary_record"
1164+
t.boolean "has_summary_record", null: false
11651165
t.string "facilitators"
11661166
t.string "promoting_unit"
11671167
t.bigint "decidim_scope_type_id"

0 commit comments

Comments
 (0)