hunterlong/statup

View on GitHub
types/configs/latest_sql.go

Summary

Maintainability
A
1 hr
Test Coverage

Method DbConfig.sqliteMigration has 9 return statements (exceeds 4 allowed).
Open

func (d *DbConfig) sqliteMigration() error {
    if err := d.Db.Exec(`ALTER TABLE hits RENAME TO hits_backup;`).Error(); err != nil {
        return err
    }
    if err := d.Db.Exec(`CREATE TABLE hits (id INTEGER PRIMARY KEY AUTOINCREMENT, service bigint, latency bigint, ping_time bigint, created_at datetime);`).Error(); err != nil {
Severity: Major
Found in types/configs/latest_sql.go - About 55 mins to fix

    Method DbConfig.genericMigration has 7 return statements (exceeds 4 allowed).
    Open

    func (d *DbConfig) genericMigration(alterStr string, isPostgres bool) error {
        var extra string
        extraType := "UNSIGNED INTEGER"
        if isPostgres {
            extra = " TYPE"
    Severity: Major
    Found in types/configs/latest_sql.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status