Commit Graph

14 Commits

Author SHA1 Message Date
Mike Dalessio fe6df7085f Finish the rollout of account_id to all core data models
Schema:
- add account_id to tables it was missing from
- make account_id a required column everywhere
- add [account_id] indexes, or add `account_id` to existing indices

Models:
- add `belongs_to :account` to all models (default to using a domain
  model's account whenever possible)
- add account_id in all the necessary fixtures
- add account_id to insert_all hashes
- pass account_id to a few initialize calls

Miscellaneous:
- update the import script to set account_id

Note that I'm not adding account_id to the join tables primarily
because I couldn't think of an easy way to populate it without making
it a full Join model, and that was more work than I have time to take
on right now.
2025-11-17 09:12:40 -05:00
Donal McBreen fc56ad9d7c Combine uuid-old and uuid branch changes
- Switch to binary 16 for UUID keys
- Remove AccountScopedRecord base class, all model use binary uuids now
- Fix the search sql to serialize uuids properly
- Patch the MySQL schema dumper to output binary lengths
2025-11-17 09:12:34 -05:00
Mike Dalessio e4011ef211 Update primary keys on customer data to UUIDs
- schema changes to primary and foreign keys
- fixture changes
- customer data models subclass AccountScopedRecord
- import script updated
2025-11-17 09:12:30 -05:00
Mike Dalessio 18f70c3312 Do not bundle notifications for inactive users
https://app.box-car.com/5986089/cards/2671
2025-10-31 14:51:09 -04:00
Jorge Manrubia a6eb928688 Fix: update ends_at when flushing bundles
If not, it can happen that the bundlers remains in a delivered state
even when it is not covering its window anymore because it has been delivered.
2025-09-16 12:10:06 +02:00
Jorge Manrubia d9cc592566 Merge pull request #1007 from basecamp/weekly-highlights
Weekly highlights
2025-09-05 17:03:38 +02:00
Jorge Manrubia aad61b36bc Generate highlights in the user timezone, now that we persist it
Also, remove the dates and duration from the highlights records. Those are not relevant, only the events-derived
key is. If two users with different timezones have different activities, they should see different summaries.
2025-09-05 12:39:09 +02:00
Jorge Manrubia cfa0149564 Persist timezones in the server
Add a beacon to persist timezones when these change (or the first time)
2025-09-05 12:11:57 +02:00
Mike Dalessio 85b6f46422 Do not try to bundle notifications for system users
ref: https://fizzy.37signals.com/5986089/collections/7/cards/1471
2025-09-01 12:37:34 -04:00
Jorge Manrubia bec4abad0c Rename method to match semantics
"rescheduling" was a from an implementation I had dropped
2025-08-29 09:28:32 +02:00
Jorge Manrubia 5c890bbc34 Bundle every few hours by default 2025-08-28 17:08:22 +02:00
Jorge Manrubia 960f074b3f Don't bundle new notifications is bundling is disabled 2025-08-28 12:53:19 +02:00
Jorge Manrubia c1c359f030 Review existing bundles when changing the pending bundles 2025-08-28 12:29:40 +02:00
Jorge Manrubia 53144a379c Add option to change the bundled email notification frequency 2025-08-28 11:56:40 +02:00