public
Description: Functional Blogging
Homepage: http://www.crossconnector.com
Clone URL: git://github.com/artofmission/crossconnector.git
Click here to lend your support to: crossconnector and make a donation at www.pledgie.com !
crossconnector / crossconnector.user / db / migrate / 001_add_invoice_options.rb
100644 17 lines (12 sloc) 0.453 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class AddInvoiceOptions < ActiveRecord::Migration
  def self.up
 
    # Associate invoices with homebases, rather than users
    rename_column :invoices, :user_id, :homebase_id rescue nil
    
    # Date trial period ends
    add_column :homebases, :trial_period_ends_at, :datetime, :default => nil
    
  end
  
  def self.down
    rename_column :invoices, :homebase_id, :user_id rescue nil
    remove_column :homebases, :trial_period_ends_at
  end
end