]> git.openstreetmap.org Git - rails.git/blob - vendor/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/templates/migration.rb
Merge branch 'master' into openID
[rails.git] / vendor / plugins / open_id_authentication / generators / upgrade_open_id_authentication_tables / templates / migration.rb
1 class <%= class_name %> < ActiveRecord::Migration
2   def self.up
3     drop_table :open_id_authentication_settings
4     drop_table :open_id_authentication_nonces
5
6     create_table :open_id_authentication_nonces, :force => true do |t|
7       t.integer :timestamp, :null => false
8       t.string :server_url, :null => true
9       t.string :salt, :null => false
10     end
11   end
12
13   def self.down
14     drop_table :open_id_authentication_nonces
15
16     create_table :open_id_authentication_nonces, :force => true do |t|
17       t.integer :created
18       t.string :nonce
19     end
20
21     create_table :open_id_authentication_settings, :force => true do |t|
22       t.string :setting
23       t.binary :value
24     end
25   end
26 end