Short, human-readable ID generators backed by SQLite counters.
Produces IDs similar to major test management tools:
- Tests:
TC-1,TC-2(like TestRail's C1234) - Runs:
RUN-1,RUN-2(like TestRail's R123) - Projects:
PRJ-1,PRJ-2 - Activities:
ACT-1,ACT-2
Counters are stored in the SQLite counters table and incremented atomically.
Exports
generateTestId,generateRunId,generateProjectId,generateActivityIdinitCountersFromExistingData— No-op (kept for backward compatibility).
- Source:
Methods
(static) generateActivityId(_dbopt)
generateActivityId(db) → "ACT-1", "ACT-2", …
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
_db |
Object |
<optional> |
— Ignored (kept for backward compatibility). |
- Source:
(static) generateNotificationSettingId()
generateNotificationSettingId() → "NS-1", "NS-2", … Used for per-project notification settings (FEA-001).
- Source:
(static) generateProjectId(_dbopt)
generateProjectId(db) → "PRJ-1", "PRJ-2", …
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
_db |
Object |
<optional> |
— Ignored (kept for backward compatibility). |
- Source:
(static) generateRunId(_dbopt)
generateRunId(db) → "RUN-1", "RUN-2", …
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
_db |
Object |
<optional> |
— Ignored (kept for backward compatibility). |
- Source:
(static) generateScheduleId()
generateScheduleId() → "SCH-1", "SCH-2", … Used for project cron schedules (ENH-006).
- Source:
(static) generateTestId(_dbopt)
generateTestId(db) → "TC-1", "TC-2", …
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
_db |
Object |
<optional> |
— Ignored (kept for backward compatibility). |
- Source:
(static) generateWebhookTokenId()
generateWebhookTokenId() → "WH-1", "WH-2", … Used for per-project CI/CD trigger tokens (ENH-011).
- Source:
(static) generateWorkspaceId()
generateWorkspaceId() → "WS-1", "WS-2", … Used for multi-tenancy workspaces (ACL-001).
- Source:
(static) generateWorkspaceMemberId()
generateWorkspaceMemberId() → "WM-1", "WM-2", … Used for workspace membership records (ACL-002).
- Source:
(static) initCountersFromExistingData(_dbopt)
No-op — counters are now managed by the SQLite counters table.
Kept for backward compatibility so existing callers don't break.
The migration script (database/migrate.js) seeds the counters table
from existing IDs when migrating from the legacy JSON store.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
_db |
Object |
<optional> |
— Ignored. |
- Source: