This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_rodax_crm/db/migrate/018_create_deals.rb

31 lines
756 B
Ruby
Raw Permalink Normal View History

class CreateDeals < ActiveRecord::Migration
def self.up
create_table :deals do |t|
t.string :name
t.text :background
t.integer :currency
t.integer :duration
t.decimal :price
t.integer :price_type
t.integer :project_id
t.integer :author_id
t.integer :assigned_to_id
t.integer :status_id, :default => 0, :null => false
t.integer :contact_id
t.integer :category_id
t.datetime :created_on
t.datetime :updated_on
end
add_index :deals, :contact_id
add_index :deals, :project_id
add_index :deals, :status_id
add_index :deals, :author_id
add_index :deals, :category_id
end
def self.down
drop_table :deals
end
end