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-0.9.72 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.71 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.70 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.69 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.68 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.67 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.66 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.65 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.64 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.63 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.62 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.61 db/migrate/20230322034022_add_to_school_name_to_ideas.rb
educode_sales-0.9.60 db/migrate/20230322034022_add_to_school_name_to_ideas.rb