Sha256: 311f130b7e86cc38ce98703b664b5aeacb348bcbe6bb6cb34c17abe702204d4c

Contents?: true

Size: 955 Bytes

Versions: 228

Compression:

Stored size: 955 Bytes

Contents

class CreateEducodeSalesRoles < ActiveRecord::Migration[5.2]
  def change
    create_table :educode_sales_roles do |t|
      t.string :name

      t.timestamps
    end
    add_column :educode_sales_staffs, :role_id, :integer
    add_column :educode_sales_staffs, :expired_at, :datetime
    add_column :educode_sales_staffs, :enabled_at, :datetime
    add_column :educode_sales_staffs, :job_type, :integer
    if EducodeSales::Common.first.nil?
      citys = ["北京", "上海", "广东", "江苏", "浙江", "重庆", "安徽", "福建", "甘肃", "广西", "贵州", "海南", "河北", "黑龙江", "河南", "湖北", "湖南", "江西", "吉林", "辽宁", "内蒙古", "宁夏", "青海", "山东", "山西", "陕西", "四川", "天津", "新疆", "西藏", "云南", "香港特别行政区", "澳门特别行政区", "台湾"]
      citys.each do |city|
        EducodeSales::Common.create(clazz: '区域', name: city)
      end
    end
  end
end

Version data entries

228 entries across 228 versions & 1 rubygems

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