Skip to content

[Bug] sp_logActivity drifts from schema (missing cols; NOT NULL ipAddress) — sync or remove #126

@Salem874

Description

@Salem874

Problem

sp_logActivity omits newer tblActivityLog columns (incl. migration-009 scanSource/qrCodeExternalID) and can fail the NOT NULL ipAddress constraint, with errors swallowed by its handler. It is currently dead code — the app uses a direct INSERT.

Fix

Either sync the procedure (add IFNULL(inputIP,'0.0.0.0') and the new columns) or remove it and adjust any references.

Acceptance criteria

  • Procedure either matches the current tblActivityLog shape or is removed.

From the 2026-06-04 schema review — see docs/SCHEMA_REVIEW_2026-06-04.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponent-databaseDatabase schema, migrations, procedurespriority-mediumMedium priority

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions