1 class AddOpenIdAuthenticationTables < ActiveRecord::Migration
3 create_table :open_id_authentication_associations, :force => true do |t|
4 t.integer :issued, :lifetime
5 t.string :handle, :assoc_type
6 t.binary :server_url, :secret
9 create_table :open_id_authentication_nonces, :force => true do |t|
10 t.integer :timestamp, :null => false
11 t.string :server_url, :null => true
12 t.string :salt, :null => false
15 add_column :users, :openid_url, :string
17 add_index :users, [:openid_url], :name => "user_openid_unique_idx", :unique => true
18 add_index :open_id_authentication_associations, [:server_url], :name => "open_id_associations_server_url_idx"
19 add_index :open_id_authentication_nonces, [:timestamp], :name => "open_id_nonces_timestamp_idx"
23 remove_index :users, :name => "user_openid_unique_idx"
24 remove_index :open_id_authentication_associations, :name => "open_id_associations_server_url_idx"
25 remove_index :open_id_authentication_nonces, :name => "open_id_nonces_timestamp_idx"
26 remove_column :users, :openid_url
27 drop_table :open_id_authentication_associations
28 drop_table :open_id_authentication_nonces