Sha256: 913094ee62af76bbe1c913e9a426c2f9445c05bf44837c63af774dd577f07620
Contents?: true
Size: 1.21 KB
Versions: 9
Compression:
Stored size: 1.21 KB
Contents
require 'devise/version' class CreateTables < ActiveRecord::Migration def self.openid_authenticatable_fields(t) if Devise::VERSION < "2.1" require 'devise/schema' t.openid_authenticatable else t.string :identity_url end end def self.rememberable_fields(t) if Devise::VERSION < "2.1" require 'devise/schema' t.rememberable else t.string :remember_token t.datetime :remember_created_at end end def self.up create_table :users do |t| openid_authenticatable_fields t rememberable_fields t t.string :email t.timestamps end create_table :database_users do |t| openid_authenticatable_fields t if Devise::VERSION < "2.1" t.database_authenticatable else t.string :email, :null => false, :default => "" t.string :encrypted_password, :null => false, :default => "" end t.timestamps end create_table :legacy_users do |t| openid_authenticatable_fields t rememberable_fields t t.string :email t.timestamps end end def self.down drop_table :users drop_table :database_users drop_table :legacy_users end end
Version data entries
9 entries across 9 versions & 1 rubygems