Sha256: 19e18b8e8b130cc9def4a620ebb3d0a107cb5a65bbc6dbb3eb13a25b2890e383

Contents?: true

Size: 471 Bytes

Versions: 6

Compression:

Stored size: 471 Bytes

Contents

class AddOldSqlAdminToDeviseModel < ActiveRecord::Migration
  def self.up
    add_column :devise_model, :old_sql_admin, :boolean, :default => false
    
    unless column_exists? :devise_model, :updated_at
      add_column :devise_model, :updated_at, :datetime
    end
    
    unless column_exists? :devise_model, :created_at
      add_column :devise_model, :created_at, :datetime
    end
  end

  def self.down
    remove_column :devise_model, :old_sql_admin
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
old_sql-1.65.0 lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb
old_sql-1.64.0 lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb
old_sql-1.63.0 lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb
old_sql-1.62.0 lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb
old_sql-1.61.0 lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb
old_sql-1.60.0 lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb