This commit is contained in:
9
db/migrate/20240625084002_add_body_to_sections.rb
Normal file
9
db/migrate/20240625084002_add_body_to_sections.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AddBodyToSections < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
change_table :sections do |t|
|
||||
t.text :body
|
||||
end
|
||||
|
||||
execute "update sections set body = l.title from leaves l where l.leafable_id = sections.id and l.leafable_type = 'Section'"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user