Showing 3 of 3 total issues

Method Migration.Apply has 10 return statements (exceeds 4 allowed).
Open

func (m *Migration) Apply(tableName string, connection *sql.DB) error {
    exists, err := m.exists(tableName, connection)
    if err != nil {
        return fmt.Errorf("[apply:%s] failed to check if migration has already been applied: '%s'", m.Name, err)
    } else if exists {
Severity: Major
Found in migration/mysql/migration.go - About 1 hr to fix

    Method Migration.Rollback has 8 return statements (exceeds 4 allowed).
    Open

    func (m *Migration) Rollback(tableName string, connection *sql.DB) error {
        stmt, err := connection.Prepare(fmt.Sprintf(
            "UPDATE %s SET status = ?",
            tableName,
        ))
    Severity: Major
    Found in migration/mysql/migration.go - About 50 mins to fix

      Method Migration.Validate has 6 return statements (exceeds 4 allowed).
      Open

      func (m *Migration) Validate(tableName string, connection *sql.DB) error {
          remoteMigration, err := NewFromDB(m.Name, tableName, connection)
          if err != nil {
              if err == sql.ErrNoRows {
                  return NoErrDoesNotExist
      Severity: Major
      Found in migration/mysql/migration.go - About 40 mins to fix
        Severity
        Category
        Status
        Source
        Language