Donal McBreen
97bcdf1853
Enforce column limits via concern
...
SQLite columns lengths are purely informational, so we'll enforce the
limits via a concern that checks the lengths from the schema.
2025-11-25 15:32:34 +00:00
Donal McBreen
c2eb840e2b
Use Uuid type directly
2025-11-25 13:47:08 +00:00
Donal McBreen
b571303385
Don't use Current.account for search records
...
It doesn't actually work, and even if we could make it work reliably
we are better off if the records always know to go to the right shard.
It does make the interface a bit more complicated as we need to select
the right shard class with `for(account_id)`.
2025-11-25 11:34:41 +00:00
Donal McBreen
2199dcc0c8
Fix name in SQL string
2025-11-21 16:01:05 +00:00
Donal McBreen
6f02cb40b1
Drop unnecessary html_safes
2025-11-21 15:46:31 +00:00
Donal McBreen
d09deca038
Fallback to search_records_0, so eager loading has a valid table
2025-11-21 15:35:58 +00:00
Donal McBreen
0989017f62
Fix rubocop
2025-11-21 15:31:00 +00:00
Donal McBreen
d48eb523b8
Fix rubocop
2025-11-21 15:30:14 +00:00
Donal McBreen
be0ce5efa0
Use dependant delete on fts table
2025-11-21 15:28:25 +00:00
Donal McBreen
b1862733dd
Merge branch 'main' into sqlite
2025-11-21 15:23:34 +00:00
Donal McBreen
525e53a2f7
Add FTS ActiveRecord model
...
Needs some special handling for the FTS virtual table format. Set the
primary key to rowid and manually specify the columns.
2025-11-21 15:21:11 +00:00
Jason Zimdars
2382326a13
Merge pull request #1638 from basecamp/expand-activity-columns
...
Expand activity columns
2025-11-21 09:11:22 -06:00
Donal McBreen
04c9d9268b
Remove wrapper methods and kwargs
2025-11-21 14:53:17 +00:00
Donal McBreen
eecdb486b7
Remove unused attribute
2025-11-21 14:42:28 +00:00
Donal McBreen
bef4b86212
Use card_search_records instead of join class method
2025-11-21 14:42:09 +00:00
Donal McBreen
aaf512875e
Add search_record has_one
2025-11-21 14:34:41 +00:00
Donal McBreen
32c3bcec9f
Merge branch 'main' into sqlite
2025-11-21 14:26:21 +00:00
Donal McBreen
ea06b2d46f
Simplify and test highlighing
2025-11-21 14:25:38 +00:00
Jorge Manrubia
41905068c0
Bundle after notification is committed to mitigate reading stale data when bundling
...
Attempt to deal with overlapping bundles being created by notifications created immediately
one after the other.
2025-11-21 14:34:05 +01:00
Donal McBreen
6e749d2b5f
Drop for_user
2025-11-21 12:39:47 +00:00
Donal McBreen
aebe3f97ed
Drop parentheses
2025-11-21 12:37:29 +00:00
Donal McBreen
02da6dbf8f
Parameterised queries
2025-11-21 12:36:45 +00:00
Donal McBreen
463a5f089a
Consolidate scopes and extract search_fields
2025-11-21 12:31:25 +00:00
Donal McBreen
f91c41d75a
Drop variables
2025-11-21 12:11:15 +00:00
Donal McBreen
01d16f96d4
Remove Search::Record.for_account
...
Instead we'll compute the table name dynamically based on
Current.account where needed. Also we'll prevent searchable records
from being saved if Current.account is not set, otherwise the after
commit callbacks will fail.
2025-11-21 12:09:21 +00:00
Donal McBreen
4008819390
Use table_name with Current.account to drop for_account
2025-11-21 11:54:21 +00:00
Donal McBreen
b92aba383e
account_key is MySQL specific
2025-11-21 11:47:28 +00:00
Donal McBreen
2e4d0b38db
Fix matching scope after merge
2025-11-21 11:43:01 +00:00
Donal McBreen
366dbd393c
Merge branch 'main' into sqlite
2025-11-21 11:39:47 +00:00
Donal McBreen
adff4591fe
Search with the tenant key
...
The key has been added and populated so use it for searching.
2025-11-21 11:09:06 +00:00
Donal McBreen
74d1cf735b
Only add and fill account_key
2025-11-21 10:20:27 +00:00
Donal McBreen
70dd754cf7
Account key for search records
...
Add an account key field to improve search performance. This field
allows us to filter the records by account directly in the fulltext
index, so we only need to examine rows belonging to the relevant account.
2025-11-21 09:38:35 +00:00
Jorge Manrubia
e4558f00ab
Merge branch 'main' into expand-activity-columns
2025-11-21 10:25:39 +01:00
Donal McBreen
4f6ec19491
Drop comments
2025-11-21 09:15:19 +00:00
Donal McBreen
0e11a139a5
Move quoting
2025-11-21 09:15:19 +00:00
Donal McBreen
62d102578f
Table name already correct
2025-11-21 09:15:19 +00:00
Donal McBreen
ca17193620
Belongs_to not optional
2025-11-21 09:15:19 +00:00
Donal McBreen
6dfb961b83
Delegate to_s to terms
2025-11-21 09:15:19 +00:00
Donal McBreen
ec06b7085b
No need to default created_at
2025-11-21 09:15:19 +00:00
Donal McBreen
19b0e25eac
Split sqlite/mysql record stuff
2025-11-21 09:15:19 +00:00
Donal McBreen
a4850fbe73
Remove adapter specific logic from searchable
2025-11-21 09:15:19 +00:00
Donal McBreen
a682a807ed
Handle SQLite date subtraction
2025-11-21 09:15:19 +00:00
Donal McBreen
cc7e091508
Disable multi-db for SQLite
2025-11-21 09:15:19 +00:00
Donal McBreen
bb36b4846f
Support SQLite searching
2025-11-21 09:15:19 +00:00
Donal McBreen
a2333d9a37
Add SQLite support
...
- UUID support
- Schema compatibility layer, ignore MySQL specific options
- Search not working yet
2025-11-21 09:15:19 +00:00
Mike Dalessio
1bbb6d0c03
Fix race condition in Card::ActivitySpike::DetectionJob
...
The check-then-act pattern in `register_activity_spike` has been
replaced with `find_or_create_by!` to eliminate the race condition
that could lead to creating multiple activity spikes for a card. To
support this change, the `card_id` index on `cards_activity_spikes`
has been made unique.
ref: https://app.fizzy.do/5986089/cards/3063
2025-11-20 15:40:42 -05:00
Mike Dalessio
88750a3498
Prefer Time.current to Time.now
2025-11-20 09:13:17 -05:00
Stanko Krtalić
f6cfb5fde4
Merge pull request #1648 from basecamp/fix-user-avatars-in-notification-bundles
...
Fix missing avatars in notification bundle emails
2025-11-20 11:19:13 +01:00
Stanko K.R.
cc41a42221
Fix missing avatars in notification bundle emails
2025-11-20 10:33:42 +01:00
Kevin McConnell
e37038c0a6
Merge pull request #1647 from basecamp/avoid-notification-deadlocks
...
Process notification recipients in consistent order
2025-11-20 09:27:57 +00:00