15 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
Stanko K.R. 8b1ca5e7fb Remove unused account associations 2025-11-17 09:11:42 -05:00
Stanko K.R. ba3f6b188e Add account_id to everything 2025-11-17 09:11:42 -05:00
Mike Dalessio ecbe040e3e Implement Notification#card
Models now know how to find their cards, rather than trying to
implement this logic in a view helper.
2025-05-21 16:30:18 -04:00
Jorge Manrubia ccb72ad229 Rename for consistency with what we had for comments 2025-04-24 14:51:25 +02:00
Jorge Manrubia f258b05b23 Delegate target to the notifiable objects 2025-04-23 16:19:50 +02:00
Jorge Manrubia 53eba9bd0b Favor after_create_commit to keep transactions fast 2025-04-23 15:28:28 +02:00
Jorge Manrubia 696732a90a Rename mentions' container => source 2025-04-23 13:41:34 +02:00
Jorge Manrubia edcc9e3279 Add mentionees as watchers 2025-04-23 12:38:06 +02:00
Jorge Manrubia 22df208f9a Render proper content for mentions, don't send mentions to yourself 2025-04-22 14:11:21 +02:00
Jorge Manrubia 8aa99e34b4 Persist notification's creator
Instead of delegating. With a polymorphic relationship, relying on a certain
attribute implies doing things like aliasing "mentioner" to "creator" or similar.
2025-04-22 13:48:43 +02:00
Jorge Manrubia 4f06473405 Notifications for mentions showing up 2025-04-22 12:02:48 +02:00
Jorge Manrubia aa3acfeaa8 Add plain text mentions 2025-04-22 11:26:56 +02:00