Skip to content

Commit 50e2d0f

Browse files
committed
Fix migration
1 parent 780afe4 commit 50e2d0f

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
class BackfillHasSummaryRecordDefault < ActiveRecord::Migration[7.0]
22
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-
3+
change_column_default :decidim_participatory_processes, :has_summary_record, from: nil, to: false
94
change_column_null :decidim_participatory_processes, :has_summary_record, false, false
105
end
116
end

db/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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", null: false
1164+
t.boolean "has_summary_record", default: false, null: false
11651165
t.string "facilitators"
11661166
t.string "promoting_unit"
11671167
t.bigint "decidim_scope_type_id"

0 commit comments

Comments
 (0)