class AddYearToSalePlans < ActiveRecord::Migration[5.2] def change add_column :educode_sales_sale_plans, :year, :string add_column :educode_sales_sale_plans, :clazz, :integer create_table :educode_sales_business_infos do |t| t.references :business t.references :staff t.references :sale_plan t.string :year, comment: '年份' t.integer :clazz, comment: '目标类型' t.date :plan_bid_on, comment: '计划投标时间' t.date :actual_bidded_on, comment: '实际投标时间' t.float :bidded_amount, comment: '中标额' t.date :plan_sign_on, comment: '计划签单时间' t.date :actual_sign_on, comment: '实际签单时间' t.float :sign_amount, comment: '签单额' t.date :plan_deploy_on, comment: '计划部署时间' t.date :actual_deploy_on, comment: '实际部署时间' t.date :plan_check_on, comment: '计划验收时间' t.date :actual_check_on, comment: '实际验收时间' t.date :prepayment_plan_on, comment: '预收款计划回款时间' t.date :prepayment_actual_on, comment: '预收款实际回款时间' t.float :prepayment_amount, comment: '预收款' t.date :check_fee_plan_on, comment: '验收款计划回款时间' t.date :check_fee_actual_on, comment: '验收款实际回款时间' t.float :check_fee, comment: '验收款' t.date :qa_plan_on, comment: '质保金计划回款时间' t.date :qa_actual_on, comment: '质保金实际回款时间' t.float :qa_amount, comment: '质保金' t.float :account_receivable, comment: '应收款' t.integer :account_receivable_clazz, comment: '应收款类型' t.float :invoice_amount, comment: '开票金额' t.timestamps end end end