restful_open_id_authenticationプラグイン
でOpenIDストアに使用していたDBを
ruby-openid 2.0に移行させるためのマイグレーション。
ruby-openid 2.0のexamplesから抜粋。

rails>>

Use this migration to upgrade the old 1.1 ActiveRecord store schema

to the new 2.0 schema.

class UpgradeOpenIdStore < ActiveRecord::Migration
def self.up
drop_table "open_id_settings"
drop_table "open_id_nonces"
create_table "open_id_nonces", :force => true do |t|
t.column :server_url, :string, :null => false
t.column :timestamp, :integer, :null => false
t.column :salt, :string, :null => false
end
end

def self.down
drop_table "open_id_nonces"
create_table "open_id_nonces", :force => true do |t|
t.column "nonce", :string
t.column "created", :integer
end

create_table "open_id_settings", :force => true do |t|
  t.column "setting", :string
  t.column "value", :binary
end

end
end
<<--

ちなみにオリジナルのプラグインが生成したマイグレーションコードはこちら。

rails>>
create_table :open_id_associations, :force => true do |t|
t.column :server_url, :binary
t.column :handle, :string
t.column :secret, :binary
t.column :issued, :integer
t.column :lifetime, :integer
t.column :assoc_type, :string
end

create_table :open_id_nonces, :force => true do |t|
  t.column :nonce,        :string
  t.column :created,      :integer
end

create_table :open_id_settings, :force => true do |t|
  t.column :setting,      :string
  t.column :value,        :binary
end

<<--

open_id_settingsは不要になって、open_id_nounces
内容が変わります。

posted by genki genki on Fri 21 Dec 2007 at 06:34 with 0 comments
Contents rssrss
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Droonga関連の記事のまとめ
RuntimeErrorの特定のメッセージに限定してrescueする方法
jQueryでscriptタグを実行せずにappendする
Tags
coffeescriptdefergroongajsmemonodenodejs
Comments rssrss
https://xn--krken21-bn4c.com https://xn--krken21-bn4c.com: Как безопасно использовать ликвидность в пулах н... 04/21 23:35
https://www.gms4you.us/ https://www.gms4you.us/: Moving professionals state, in today's world hirin... 04/21 19:41
https://www.gms4you.us/ https://www.gms4you.us/: Industry experts are convinced, that hiring movers... 04/21 19:41
https://xn--mgmrket7-1ya.com https://xn--mgmrket7-1ya.com: Mega мориарти в 2026: простое объяснение без воды.... 04/21 16:23
https://t.me/wp_seo/238 https://t.me/wp_seo/238: Использую для аудита старых проектов, очень удоб... 04/21 14:20
https://max.ru/c/-70933456786811/AZ0gl6yvcec https://max.ru/c/-70933456786811/AZ0gl6yvcec: Работает ли этот метод для Яндекса? 04/21 14:14
https://max.ru/c/-70933456786811/AZ0gl6yvcec https://max.ru/c/-70933456786811/AZ0gl6yvcec: Спасибо, буду тестировать этот функционал! 04/21 14:05
https://vk.com/wall24679647_12405 https://vk.com/wall24679647_12405: Этот софт поддерживает работу через прокси? 04/21 13:46