Sha256: 40ce6df4833a9fdba4adb9f1057cb5f78036bd0163f019ebb393daca7ff9131e

Contents?: true

Size: 446 Bytes

Versions: 13

Compression:

Stored size: 446 Bytes

Contents

# frozen_string_literal: true

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

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.22.0 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.21.0 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.20.1 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.20.0 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.19.2 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.19.0 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.18.2 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.17.3 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.18.1 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.18.0 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.17.2 db/migrate/20100928030602_create_permissions.rb
fat_free_crm-0.17.1 db/migrate/20100928030602_create_permissions.rb