From 96cdd2271f022818e221051ea4d0161a05a7d1a0 Mon Sep 17 00:00:00 2001 From: jaeckel Date: Tue, 3 Nov 2009 14:15:15 +0100 Subject: [PATCH] added files for date (start,end,deadline) and relations to other modules (accounts, contacts) first revision that can create proposals properly and display them in list view --- .../030_add_non_ffc_fields_to_proposals.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 db/migrate/030_add_non_ffc_fields_to_proposals.rb diff --git a/db/migrate/030_add_non_ffc_fields_to_proposals.rb b/db/migrate/030_add_non_ffc_fields_to_proposals.rb new file mode 100644 index 0000000000..7f70155a5a --- /dev/null +++ b/db/migrate/030_add_non_ffc_fields_to_proposals.rb @@ -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