Sha256: 3ff0f253b2936dd5750ac357826f9d2fbd559ab88b690429b37e4c7bf68fb788
Contents?: true
Size: 716 Bytes
Versions: 6
Compression:
Stored size: 716 Bytes
Contents
class AddActivityLoggingToUsers < ActiveRecord::CompatibleLegacyMigration.migration_class def self.up add_column :users, :last_login_at, :datetime, default: nil add_column :users, :last_logout_at, :datetime, default: nil add_column :users, :last_activity_at, :datetime, default: nil add_column :users, :last_login_from_ip_address, :string, default: nil add_index :users, [:last_logout_at, :last_activity_at] end def self.down remove_index :users, [:last_logout_at, :last_activity_at] remove_column :users, :last_activity_at remove_column :users, :last_logout_at remove_column :users, :last_login_at remove_column :users, :last_login_from_ip_address end end
Version data entries
6 entries across 6 versions & 1 rubygems