We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: A Ruby on Rails-based OpenID server for all ya identity providers out there. It is pretty close to the current OpenID specifications and supports SReg, AX (only fetch requests, yet) and PAPE
Homepage: http://dennisbloete.de/projects/masquerade/
Clone URL: git://github.com/dbloete/masquerade.git
Click here to lend your support to: masquerade and make a donation at www.pledgie.com !
masquerade / db / migrate / 002_add_type_identifier_to_release_policies.rb
100644 15 lines (13 sloc) 0.557 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class AddTypeIdentifierToReleasePolicies < ActiveRecord::Migration
  def self.up
    add_column :release_policies, :type_identifier, :string
    ReleasePolicy.find(:all).each do |release_policy|
      release_policy.update_attribute(:type_identifier, release_policy.property)
    end
    remove_index :release_policies, :column => [:site_id, :property]
    add_index :release_policies, [:site_id, :property, :type_identifier], :unique => true, :name => :unique_property
  end
 
  def self.down
    remove_column :release_policies, :type_identifier
  end
end