about 1 year ago

第二课3-7

Raises ActiveRecord::PendingMigrationError error if any migrations are pending.

  def check_pending!(connection = Base.connection)
    raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?(connection)
  end

  def load_schema_if_pending!
← 删除文件命令 第二课 加分题 →