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.
This commit is contained in:
Jorge Manrubia
2025-09-05 12:39:09 +02:00
parent cfa0149564
commit aad61b36bc
10 changed files with 264 additions and 54 deletions
+18 -31
View File
@@ -496,7 +496,7 @@ columns:
default_function:
collation:
comment:
- &37 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
- &36 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: title
cast_type: *7
@@ -577,11 +577,11 @@ columns:
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: all_access
cast_type: &33 !ruby/object:ActiveModel::Type::Boolean
cast_type: &32 !ruby/object:ActiveModel::Type::Boolean
precision:
scale:
limit:
sql_type_metadata: &34 !ruby/object:ActiveRecord::ConnectionAdapters::SqlTypeMetadata
sql_type_metadata: &33 !ruby/object:ActiveRecord::ConnectionAdapters::SqlTypeMetadata
sql_type: boolean
type: :boolean
limit:
@@ -875,7 +875,7 @@ columns:
comment:
filters_tags:
- *20
- &36 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
- &35 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: tag_id
cast_type: *3
@@ -942,7 +942,7 @@ columns:
collation:
comment:
- *6
- &31 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: starts_at
cast_type: *1
@@ -992,7 +992,7 @@ columns:
- *9
- *18
period_highlights:
- &35 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
- &34 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: content
cast_type: *15
@@ -1004,19 +1004,8 @@ columns:
comment:
- *30
- *5
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: duration
cast_type: *11
sql_type_metadata: *12
'null': false
default: 604800
default_function:
collation:
comment:
- *6
- *19
- *31
- *9
pins:
- *23
@@ -1058,7 +1047,7 @@ columns:
collation:
comment:
- *9
- &32 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
- &31 !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: user_agent
cast_type: *7
@@ -1204,21 +1193,21 @@ columns:
collation:
comment:
- *9
- *32
- *31
- *18
steps:
- *23
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: completed
cast_type: *33
sql_type_metadata: *34
cast_type: *32
sql_type_metadata: *33
'null': false
default: false
default_function:
collation:
comment:
- *35
- *34
- *5
- *6
- *9
@@ -1226,12 +1215,12 @@ columns:
- *23
- *5
- *6
- *36
- *35
- *9
tags:
- *5
- *6
- *37
- *36
- *9
user_settings:
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
@@ -1262,8 +1251,8 @@ columns:
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: active
cast_type: *33
sql_type_metadata: *34
cast_type: *32
sql_type_metadata: *33
'null': false
default: true
default_function:
@@ -1322,8 +1311,8 @@ columns:
- !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column
auto_increment:
name: watching
cast_type: *33
sql_type_metadata: *34
cast_type: *32
sql_type_metadata: *33
'null': false
default: true
default_function:
@@ -2553,8 +2542,6 @@ indexes:
unique: true
columns:
- key
- starts_at
- duration
lengths: {}
orders: {}
opclasses: {}
@@ -3006,4 +2993,4 @@ indexes:
comment:
valid: true
workflows: []
version: 20250905093718
version: 20250905101432