Sha256: 0ff37fb245b03bae8f79c64bbfa7188109fef12fee7b7d2235f3e727d56629cb

Contents?: true

Size: 589 Bytes

Versions: 32

Compression:

Stored size: 589 Bytes

Contents

class CreateNewMemberships < ActiveRecord::Migration
  def self.up
    create_table :memberships do |t|
      t.belongs_to  :organization
      t.belongs_to  :membership_type
      t.datetime    :expires_at
      t.belongs_to  :member
      t.belongs_to  :cart

      t.integer     :price
      t.integer     :sold_price

      t.datetime    :starts_at
      t.datetime    :ends_at

      t.integer     :service_fee

      t.timestamps
    end

    add_index :memberships, :organization_id
    add_index :memberships, :member_id
  end

  def self.down
    drop_table :memberships
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
artfully_ose-1.2.0.pre.11 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.10 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.9 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.8 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.7 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.6 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.5 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.4 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.3 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.2 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre.1 db/migrate/20130725012338_create_new_memberships.rb
artfully_ose-1.2.0.pre db/migrate/20130725012338_create_new_memberships.rb