git-svn-id: https://192.168.0.254/svn/Rodax.redmine_rodax_crm/trunk@3 ff88604e-da85-c949-a72f-fc3aa3ba3724
32 lines
797 B
Ruby
32 lines
797 B
Ruby
class CreateContracts < ActiveRecord::Migration
|
|
def self.up
|
|
create_table :contracts 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
|
|
t.datetime :start_date
|
|
t.datetime :end_date
|
|
end
|
|
add_index :contracts, :contact_id
|
|
add_index :contracts, :status_id
|
|
add_index :contracts, :author_id
|
|
add_index :contracts, :category_id
|
|
|
|
end
|
|
|
|
def self.down
|
|
drop_table :contracts
|
|
end
|
|
end
|