Sha256: 2b38feddd4617b9168d5b25233245fdea88dd211f700cad71bdae83ca85b6674

Contents?: true

Size: 420 Bytes

Versions: 8

Compression:

Stored size: 420 Bytes

Contents

class CreatePermissions < ActiveRecord::Migration[4.2]
  def self.up
    create_table :permissions, force: true do |t|
      t.references :user                          # User who is allowed to access the asset.
      t.references :asset, polymorphic: true   # Creates asset_id and asset_type.
      t.timestamps
    end

    add_index :permissions, :user_id
  end

  def self.down
    drop_table :permissions
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fat_free_crm-0.15.2 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.16.4 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.15.1 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.16.3 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.16.2 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.16.1 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.16.0 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.15.0 db/migrate/20100928030602_create_permissions.rb