Sha256: 077f281a70464a078211836738eb3df47c8560b4abe0c66eea80f57392554db3
Contents?: true
Size: 425 Bytes
Versions: 6
Compression:
Stored size: 425 Bytes
Contents
class AddCodeToSections < ActiveRecord::Migration[5.1] def change add_column :sections, :code, :string, null: false, limit: 64 begin Dhatu::Section.all.each do |section| section.code = section.section_type.code if section.section_type section.save end rescue puts "" puts "" puts "" puts "ERROR in AddCodeToSections".red puts "" puts "" puts "" end end end
Version data entries
6 entries across 6 versions & 1 rubygems