forked from fatfreecrm/fat_free_crm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added files for date (start,end,deadline) and relations to other modu…
…les (accounts, contacts) first revision that can create proposals properly and display them in list view
- Loading branch information
1 parent
831e2f0
commit 96cdd22
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class AddNonFfcFieldsToProposals < ActiveRecord::Migration | ||
def self.up | ||
add_column :proposals, :abbreviation, :string, :default => "WEB" | ||
add_column :proposals, :state, :string, :default => "draft" | ||
add_column :proposals, :deadline, :date | ||
# references to other modules (account and contacts) | ||
add_column :proposals, :client_account_id, :integer | ||
add_column :proposals, :client_contact_id, :integer | ||
add_column :proposals, :client_technical_contact_id, :integer | ||
add_column :proposals, :employee_contact_id, :integer | ||
add_column :proposals, :employee_technical_contact_id, :integer | ||
end | ||
|
||
def self.down | ||
remove_column :proposals, :abbreviation, :string | ||
remove_column :proposals, :state, :string | ||
remove_column :proposals, :deadline, :date | ||
|
||
remove_column :proposals, :client_account_id, :integer | ||
remove_column :proposals, :client_contact_id, :integer | ||
remove_column :proposals, :client_technical_contact_id, :integer | ||
remove_column :proposals, :employee_contact_id, :integer | ||
remove_column :proposals, :employee_technical_contact_id, :integer | ||
end | ||
end |