class CreateUsers < ActiveRecord::Migration[5.1] def up create_table :users, force: true do |t| t.boolean :admin, null: false, default: false t.integer :status, null: false, default: 1, index: true t.string :login, null: false t.string :first_name t.string :last_name t.string :email, null: false t.string :language, null: true # Authlogic::ActsAsAuthentic::Password t.string :crypted_password t.string :password_salt # Authlogic::ActsAsAuthentic::PersistenceToken t.string :persistence_token t.index :persistence_token, unique: true # Authlogic::ActsAsAuthentic::SingleAccessToken t.string :single_access_token t.index :single_access_token, unique: true # Authlogic::ActsAsAuthentic::PerishableToken t.string :perishable_token t.index :perishable_token, unique: true # Authlogic::Session::MagicColumns t.integer :login_count, default: 0, null: false t.integer :failed_login_count, default: 0, null: false t.datetime :last_request_at t.datetime :current_login_at t.datetime :last_login_at t.string :current_login_ip t.string :last_login_ip t.references :edited_by t.datetime :edited_at t.timestamps end end def down drop_table :users end end