Sha256: f97e5463313c8dbd83d7873c4421863fbf28a542574fbb5d403b460c4452ada7
Contents?: true
Size: 681 Bytes
Versions: 1
Compression:
Stored size: 681 Bytes
Contents
class BentoCreateBentoMemberships < ActiveRecord::Migration def self.up create_table :bento_memberships do |t| t.integer :account_id t.integer :user_id t.timestamps end add_index :bento_memberships, [:account_id, :user_id], :unique => true # If you know for sure that you don't want to be able # to have users that belongs to several accounts # please remove the above lines and uncomment the lines below # add_column :users, :account_id, :integer # add_index :users, :account_id end def self.down drop_table :bento_memberships # remove_column :users, :account_id # remove_index :users, :account_id end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bento-0.0.3 | spec/rails_app/db/migrate/20110821095924_bento_create_bento_memberships.rb |