Sha256: fb755531e36ed404a0ccb237a03b81d68c9037d1bcce0c9d22907b6cabfc7cae
Contents?: true
Size: 714 Bytes
Versions: 11
Compression:
Stored size: 714 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, %i[last_logout_at last_activity_at] end def self.down remove_index :users, %i[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
11 entries across 11 versions & 1 rubygems