Sha256: a17ba45679e5dded9e0e5744c9ff72f754eb77a9a03f8fc0403b5a4ae2cd0c40

Contents?: true

Size: 741 Bytes

Versions: 13

Compression:

Stored size: 741 Bytes

Contents

class CreateCredentials < ActiveRecord::Migration
  def change
    create_table :credentials do |t|
      t.references :user, :null => false
      t.string :type, :limit => 32, :null => false
      t.string :name, :limit => 128, :null => true
      
      t.boolean :verified, :null => false, :default => false
      
      t.binary :key, :limit => 2.kilobytes, :null => true
    end
    
    # All the credentials (maybe of a specific type) belonging to a user.
    add_index :credentials, [:user_id, :type], :unique => false,
                                               :null => false
    # A specific credential, to find out what user it belongs to.
    add_index :credentials, [:type, :name], :unique => true, :null => true
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
authpwn_rails-0.11.1 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.11.0 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.12 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.11 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.10 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.9 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.8 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.7 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.6 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.5 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.4 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.3 lib/authpwn_rails/generators/templates/003_create_credentials.rb
authpwn_rails-0.10.2 lib/authpwn_rails/generators/templates/003_create_credentials.rb