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/026_create_contracts.rb

32 lines
797 B
Ruby
Raw Normal View History

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