restful_op
1 # Use this migration to upgrade the old 1.1 ActiveRecord store schema 2 # to the new 2.0 schema. 3 class UpgradeOpe nIdStore < ActiveReco rd::Migrat ion 4 def self.up 5 drop_table "open_id_se ttings" 6 drop_table "open_id_no nces" 7 create_tab le "open_id_no nces", :force => true do |t| 8 t.column :server_url , :string, :null => false 9 t.column :timestamp, :integer, :null => false 10 t.column :salt, :string, :null => false 11 end 12 end 13 14 def self.down 15 drop_table "open_id_no nces" 16 create_tab le "open_id_no nces", :force => true do |t| 17 t.column "nonce", :string 18 t.column "created", :integer 19 end 20 21 create_tab le "open_id_se ttings", :force => true do |t| 22 t.column "setting", :string 23 t.column "value", :binary 24 end 25 end 26 end
ちなみにオリジナルのプラグインが生成したマイグレーションコードはこちら。
1 create_table :open_id_as sociations , :force => true do |t| 2 t.column :server_url , :binary 3 t.column :handle, :string 4 t.column :secret, :binary 5 t.column :issued, :integer 6 t.column :lifetime, :integer 7 t.column :assoc_type , :string 8 end 9 10 create_tab le :open_id_no nces, :force => true do |t| 11 t.column :nonce, :string 12 t.column :created, :integer 13 end 14 15 create_tab le :open_id_se ttings, :force => true do |t| 16 t.column :setting, :string 17 t.column :value, :binary 18 end
open_id_se
は不要になって、open_id_no
の
内容が変わります。
posted by
genki
on Fri 21 Dec 2007
at 06:40