class CreatePaymentsTable < ActiveRecord::Migration
  def self.up
    create_table :payments do |t|
	t.integer :period_zp_id, :author_id, :employee_id
	t.text :description
        t.datetime :operation_date, :created_at, :null => false
        t.decimal :sum
    end
    rename_column :payrolls, :period_id, :period_zp_id
  end

  def self.down
    drop_table :payments
  end
end
