Class: AddOldSqlAdminToDeviseModel
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddOldSqlAdminToDeviseModel
- Defined in:
- lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
14 15 16 |
# File 'lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb', line 14 def self.down remove_column :devise_model, :old_sql_admin end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/old_sql/templates/add_old_sql_admin_to_users_migration.rb', line 2 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 |