DynamoDB tables
Tables are defined in actionstools_app/init.py (dynamo_tables) and accessed through
flask-dynamo. They are not managed by the SAM stack; GET /setup-install can create missing ones
in a fresh environment.
Naming
| Table | Production (ENV_NAME=production) |
Every other env |
|---|---|---|
notes |
|
|
comments, files, settings, counters, tasks, tasks_counters, notifications |
|
|
The suffix is chosen from ENV_NAME in code; the table names in the Env mapping of
template.yaml must match it for IAM to allow access. Local runs use the _staging tables of
whatever account the credentials point at.
Tables
| Table | Key | Indexes |
|---|---|---|
notes |
|
GSI |
comments |
|
GSI |
files |
|
GSI |
settings |
|
GSI |
tasks |
|
GSI |
counters |
|
— (task |
tasks_counters |
|
— (filter counters, |
notifications |
|
GSI |
All index names end in -index (for example target_uuid-created_at-index); the constants are
INDEX_* in actionstools_app/init.py.
Item conventions
-
uuidis generated on create;created_at/updated_atare set by the CRUD service. Tasks use integer epoch seconds (use_timestamps=True); the other tables usestr(datetime.utcnow()). -
Deletes are soft:
deleted_atis set and the item is filtered out of reads. -
Free-form payload (
data, orconfig_valuefor settings) is stored in marshalled DynamoDB form and unmarshalled on read. -
Owner-only changes are checked with
OwnerValidatoragainst the Payability internal API;CRM_ADMINusers may change anything.