Sha256: af7498340505c508049246e4bd3fe66ad25f157e47c2112e5a624d46dadca3b0

Contents?: true

Size: 602 Bytes

Versions: 93

Compression:

Stored size: 602 Bytes

Contents

class AddToSchoolNameToIdeas < ActiveRecord::Migration[5.2]
  def change
    add_column :educode_sales_ideas,:school_name,:string
    add_column :educode_sales_ideas,:department_name,:string
    add_column :educode_sales_ideas,:sale_staff_id,:integer
    add_column :educode_sales_ideas,:idea_staff_id,:integer
    add_column :educode_sales_ideas,:assist_staff_ids,:text
    add_column :educode_sales_ideas,:attachment_id,:integer

    ideas = EducodeSales::Idea.all
    ideas.each do |d|
      d.school_name = d.school&.name
      d.department_name = d.department&.name
      d.save
    end
  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
educode_sales-1.10.74 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.73 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.72 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.71 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.70 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.59 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.58 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.49 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.48 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.46 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.41 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.37 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.36 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.35 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.34 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.33 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.31 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.30 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.29 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-1.10.28 db/migrate/20230322034022_add_to_school_name_to_ideas.rb