Methods
C
D
I
N
P
T
V
Class Public methods
create_table(limit=nil)
# File activerecord/lib/active_record/schema_migration.rb, line 24
def create_table(limit=nil)
  unless table_exists?
    version_options = {null: false}
    version_options[:limit] = limit if limit

    connection.create_table(table_name, id: false) do |t|
      t.column :version, :string, version_options
    end
    connection.add_index table_name, :version, unique: true, name: index_name
  end
end
drop_table()
# File activerecord/lib/active_record/schema_migration.rb, line 36
def drop_table
  connection.drop_table table_name if table_exists?
end
index_name()
# File activerecord/lib/active_record/schema_migration.rb, line 16
def index_name
  "#{table_name_prefix}unique_#{ActiveRecord::Base.schema_migrations_table_name}#{table_name_suffix}"
end
normalize_migration_number(number)
# File activerecord/lib/active_record/schema_migration.rb, line 40
def normalize_migration_number(number)
  "%.3d" % number.to_i
end
normalized_versions()
# File activerecord/lib/active_record/schema_migration.rb, line 44
def normalized_versions
  pluck(:version).map { |v| normalize_migration_number v }
end
primary_key()
# File activerecord/lib/active_record/schema_migration.rb, line 8
def primary_key
  nil
end
table_exists?()
# File activerecord/lib/active_record/schema_migration.rb, line 20
def table_exists?
  connection.table_exists?(table_name)
end
table_name()
# File activerecord/lib/active_record/schema_migration.rb, line 12
def table_name
  "#{table_name_prefix}#{ActiveRecord::Base.schema_migrations_table_name}#{table_name_suffix}"
end
Instance Public methods
version()
# File activerecord/lib/active_record/schema_migration.rb, line 49
def version
  super.to_i
end