class Mongration::Migration

@private

Public Class Methods

create_by_file_name(file_name) click to toggle source
# File lib/mongration/migration.rb, line 16
def self.create_by_file_name(file_name)
  create(file_name: file_name)
end
destroy_by_file_name(file_name) click to toggle source
# File lib/mongration/migration.rb, line 20
def self.destroy_by_file_name(file_name)
  where(file_name: file_name).first.destroy
end
file_names() click to toggle source
# File lib/mongration/migration.rb, line 24
def self.file_names
  Migration.pluck(:file_name)
end
last() click to toggle source
# File lib/mongration/migration.rb, line 28
def self.last
  all.to_a.max
end

Public Instance Methods

destroy(*) click to toggle source
# File lib/mongration/migration.rb, line 32
def destroy(*)
  self.deleted_at = Time.now
  save!
end