@kaeawc/auto-mobile 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/README.md.backup +3 -3
- package/dist/schemas/test-plan.schema.json +6 -2
- package/dist/schemas/tool-definitions.json +2549 -546
- package/dist/src/db/eventTables.ts +8 -0
- package/dist/src/db/migrations/2025_12_28_000_initial_schema.ts +3 -3
- package/dist/src/db/migrations/2025_12_30_000_performance_thresholds.ts +3 -3
- package/dist/src/db/migrations/2025_12_30_001_navigation_graph.ts +9 -9
- package/dist/src/db/migrations/2025_12_31_000_accessibility_baselines.ts +3 -3
- package/dist/src/db/migrations/2025_12_31_001_memory_audit.ts +4 -4
- package/dist/src/db/migrations/2026_01_01_000_recomposition_metrics.ts +2 -2
- package/dist/src/db/migrations/2026_01_02_000_prediction_history.ts +4 -4
- package/dist/src/db/migrations/2026_01_03_000_feature_flags.ts +3 -3
- package/dist/src/db/migrations/2026_01_03_000_test_executions.ts +2 -2
- package/dist/src/db/migrations/2026_01_05_000_tool_calls.ts +2 -2
- package/dist/src/db/migrations/2026_01_08_000_test_coverage.ts +4 -4
- package/dist/src/db/migrations/2026_01_09_000_video_recordings.ts +3 -3
- package/dist/src/db/migrations/2026_01_10_000_device_snapshots.ts +3 -3
- package/dist/src/db/migrations/2026_01_14_000_appearance_config.ts +3 -3
- package/dist/src/db/migrations/2026_01_25_001_test_run_details.ts +2 -2
- package/dist/src/db/migrations/2026_01_27_000_crash_anr_monitoring.ts +2 -2
- package/dist/src/db/migrations/2026_01_27_000_failures.ts +7 -7
- package/dist/src/db/migrations/2026_01_29_000_named_nodes.ts +3 -3
- package/dist/src/db/migrations/2026_01_30_000_performance_live_metrics.ts +1 -1
- package/dist/src/db/migrations/2026_03_15_000_telemetry_events.ts +5 -5
- package/dist/src/db/migrations/2026_03_18_000_navigation_events.ts +2 -2
- package/dist/src/db/migrations/2026_03_19_000_storage_events.ts +2 -2
- package/dist/src/db/migrations/2026_03_19_001_layout_events.ts +2 -2
- package/dist/src/db/migrations/2026_04_01_000_drop_custom_events.ts +2 -2
- package/dist/src/db/migrations/2026_04_02_000_device_sessions.ts +3 -3
- package/dist/src/db/migrations/2026_07_01_000_failure_groups_signature_unique.ts +162 -0
- package/dist/src/db/migrations/2026_07_02_000_event_composite_indexes.ts +62 -0
- package/dist/src/db/migrations/2026_07_03_000_drop_redundant_device_indexes.ts +66 -0
- package/dist/src/db/migrations/2026_07_03_000_repair_datetime_now_defaults.ts +268 -0
- package/dist/src/db/migrations/2026_07_04_000_storage_events_key_lookup.ts +60 -0
- package/dist/src/db/migrations/2026_07_05_000_repair_updated_at_defaults.ts +242 -0
- package/dist/src/index.js +533 -390
- package/dist/src/index.js.map +1 -1
- package/dist/vendor/libwebp/COPYING +30 -0
- package/dist/vendor/libwebp/PATENTS +23 -0
- package/dist/vendor/libwebp/README.md +13 -0
- package/dist/vendor/libwebp/README.upstream.md +54 -0
- package/dist/vendor/libwebp/win32-x64/cwebp.exe +0 -0
- package/dist/vendor/libwebp/win32-x64/dwebp.exe +0 -0
- package/package.json +9 -4
- package/schemas/test-plan.schema.json +6 -2
- package/schemas/tool-definitions.json +2549 -546
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// Create device_configs table
|
|
@@ -11,9 +11,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
11
11
|
.addColumn("active_mode", "text")
|
|
12
12
|
.addColumn("config_json", "text", col => col.notNull().defaultTo("{}"))
|
|
13
13
|
.addColumn("created_at", "text", col =>
|
|
14
|
-
col.notNull().defaultTo(
|
|
14
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
15
15
|
)
|
|
16
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
16
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
17
17
|
.execute();
|
|
18
18
|
|
|
19
19
|
// Create index on device_id for fast lookups
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// Create performance_thresholds table
|
|
@@ -19,7 +19,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
19
19
|
.addColumn("touch_latency_threshold_ms", "real", col => col.notNull())
|
|
20
20
|
.addColumn("weight", "real", col => col.notNull().defaultTo(1.0)) // For weighted average
|
|
21
21
|
.addColumn("created_at", "text", col =>
|
|
22
|
-
col.notNull().defaultTo(
|
|
22
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
23
23
|
)
|
|
24
24
|
.addColumn("ttl_hours", "integer", col => col.notNull().defaultTo(24)) // TTL in hours
|
|
25
25
|
.execute();
|
|
@@ -70,7 +70,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
70
70
|
.addColumn("touch_latency_ms", "real")
|
|
71
71
|
.addColumn("diagnostics_json", "text") // JSON blob for detailed diagnostics
|
|
72
72
|
.addColumn("created_at", "text", col =>
|
|
73
|
-
col.notNull().defaultTo(
|
|
73
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
74
74
|
)
|
|
75
75
|
.execute();
|
|
76
76
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// Create navigation_apps table
|
|
@@ -7,9 +7,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
7
7
|
.ifNotExists()
|
|
8
8
|
.addColumn("app_id", "text", col => col.primaryKey())
|
|
9
9
|
.addColumn("created_at", "text", col =>
|
|
10
|
-
col.notNull().defaultTo(
|
|
10
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
11
11
|
)
|
|
12
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
12
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
13
13
|
.execute();
|
|
14
14
|
|
|
15
15
|
// Create navigation_nodes table
|
|
@@ -27,7 +27,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
27
27
|
.addColumn("back_stack_depth", "integer")
|
|
28
28
|
.addColumn("task_id", "integer")
|
|
29
29
|
.addColumn("created_at", "text", col =>
|
|
30
|
-
col.notNull().defaultTo(
|
|
30
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
31
31
|
)
|
|
32
32
|
.execute();
|
|
33
33
|
|
|
@@ -54,7 +54,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
54
54
|
.addColumn("tool_args", "text")
|
|
55
55
|
.addColumn("timestamp", "integer", col => col.notNull())
|
|
56
56
|
.addColumn("created_at", "text", col =>
|
|
57
|
-
col.notNull().defaultTo(
|
|
57
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
58
58
|
)
|
|
59
59
|
.execute();
|
|
60
60
|
|
|
@@ -101,7 +101,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
101
101
|
.addColumn("first_seen_at", "integer", col => col.notNull())
|
|
102
102
|
.addColumn("last_seen_at", "integer", col => col.notNull())
|
|
103
103
|
.addColumn("created_at", "text", col =>
|
|
104
|
-
col.notNull().defaultTo(
|
|
104
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
105
105
|
)
|
|
106
106
|
.execute();
|
|
107
107
|
|
|
@@ -145,7 +145,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
145
145
|
.addColumn("modal_identifier", "text", col => col.notNull())
|
|
146
146
|
.addColumn("stack_level", "integer", col => col.notNull())
|
|
147
147
|
.addColumn("created_at", "text", col =>
|
|
148
|
-
col.notNull().defaultTo(
|
|
148
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
149
149
|
)
|
|
150
150
|
.execute();
|
|
151
151
|
|
|
@@ -169,7 +169,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
169
169
|
.addColumn("modal_identifier", "text", col => col.notNull())
|
|
170
170
|
.addColumn("stack_level", "integer", col => col.notNull())
|
|
171
171
|
.addColumn("created_at", "text", col =>
|
|
172
|
-
col.notNull().defaultTo(
|
|
172
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
173
173
|
)
|
|
174
174
|
.execute();
|
|
175
175
|
|
|
@@ -199,7 +199,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
199
199
|
.addColumn("speed", "text")
|
|
200
200
|
.addColumn("swipe_count", "integer")
|
|
201
201
|
.addColumn("created_at", "text", col =>
|
|
202
|
-
col.notNull().defaultTo(
|
|
202
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
203
203
|
)
|
|
204
204
|
.execute();
|
|
205
205
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// Create accessibility_baselines table
|
|
@@ -9,9 +9,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
9
9
|
.addColumn("screen_id", "text", col => col.notNull().unique())
|
|
10
10
|
.addColumn("violations_json", "text", col => col.notNull()) // JSON blob of WcagViolation[]
|
|
11
11
|
.addColumn("created_at", "text", col =>
|
|
12
|
-
col.notNull().defaultTo(
|
|
12
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
13
13
|
)
|
|
14
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
14
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
15
15
|
.execute();
|
|
16
16
|
|
|
17
17
|
// Create index on screen_id for fast lookups
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// Create memory_thresholds table for per-app threshold configuration
|
|
@@ -15,7 +15,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
15
15
|
.addColumn("unreachable_objects_threshold", "integer", col => col.notNull()) // Max unreachable objects
|
|
16
16
|
.addColumn("weight", "real", col => col.notNull().defaultTo(1.0)) // For weighted threshold calculation
|
|
17
17
|
.addColumn("created_at", "text", col =>
|
|
18
|
-
col.notNull().defaultTo(
|
|
18
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
19
19
|
)
|
|
20
20
|
.addColumn("ttl_hours", "integer", col => col.notNull().defaultTo(24)) // TTL in hours
|
|
21
21
|
.execute();
|
|
@@ -44,7 +44,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
44
44
|
.addColumn("sample_count", "integer", col => col.notNull().defaultTo(1)) // Number of samples in baseline
|
|
45
45
|
.addColumn("last_updated", "text", col => col.notNull())
|
|
46
46
|
.addColumn("created_at", "text", col =>
|
|
47
|
-
col.notNull().defaultTo(
|
|
47
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
48
48
|
)
|
|
49
49
|
.execute();
|
|
50
50
|
|
|
@@ -90,7 +90,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
90
90
|
.addColumn("violations_json", "text") // JSON array of MemoryViolation[]
|
|
91
91
|
.addColumn("diagnostics_json", "text") // JSON blob for detailed diagnostics
|
|
92
92
|
.addColumn("created_at", "text", col =>
|
|
93
|
-
col.notNull().defaultTo(
|
|
93
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
94
94
|
)
|
|
95
95
|
.execute();
|
|
96
96
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Kysely } from "kysely";
|
|
1
|
+
import { Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<any>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -21,7 +21,7 @@ export async function up(db: Kysely<any>): Promise<void> {
|
|
|
21
21
|
.addColumn("stable_annotated", "integer")
|
|
22
22
|
.addColumn("remembered_count", "integer")
|
|
23
23
|
.addColumn("timestamp", "text", col => col.notNull())
|
|
24
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
24
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(CURRENT_TIMESTAMP)`))
|
|
25
25
|
.execute();
|
|
26
26
|
|
|
27
27
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -23,7 +23,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
23
23
|
.addColumn("partial_match", "integer", col => col.notNull())
|
|
24
24
|
.addColumn("error_type", "text")
|
|
25
25
|
.addColumn("created_at", "text", col =>
|
|
26
|
-
col.notNull().defaultTo(
|
|
26
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
27
27
|
)
|
|
28
28
|
.execute();
|
|
29
29
|
|
|
@@ -70,9 +70,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
70
70
|
.addColumn("successes", "integer", col => col.notNull())
|
|
71
71
|
.addColumn("total_confidence", "real", col => col.notNull())
|
|
72
72
|
.addColumn("brier_score_sum", "real", col => col.notNull())
|
|
73
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
73
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
74
74
|
.addColumn("created_at", "text", col =>
|
|
75
|
-
col.notNull().defaultTo(
|
|
75
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
76
76
|
)
|
|
77
77
|
.execute();
|
|
78
78
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -8,9 +8,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
8
8
|
.addColumn("enabled", "integer", col => col.notNull().defaultTo(0))
|
|
9
9
|
.addColumn("config_json", "text")
|
|
10
10
|
.addColumn("created_at", "text", col =>
|
|
11
|
-
col.notNull().defaultTo(
|
|
11
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
12
12
|
)
|
|
13
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
13
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
14
14
|
.execute();
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -23,7 +23,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
23
23
|
.addColumn("is_ci", "integer")
|
|
24
24
|
.addColumn("session_uuid", "text")
|
|
25
25
|
.addColumn("created_at", "text", col =>
|
|
26
|
-
col.notNull().defaultTo(
|
|
26
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
27
27
|
)
|
|
28
28
|
.execute();
|
|
29
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -9,7 +9,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
9
9
|
.addColumn("timestamp", "text", col => col.notNull())
|
|
10
10
|
.addColumn("session_uuid", "text")
|
|
11
11
|
.addColumn("created_at", "text", col =>
|
|
12
|
-
col.notNull().defaultTo(
|
|
12
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
13
13
|
)
|
|
14
14
|
.execute();
|
|
15
15
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// Create test_coverage_sessions table to track test run sessions
|
|
@@ -15,7 +15,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
15
15
|
.addColumn("total_nodes_visited", "integer", col => col.notNull().defaultTo(0))
|
|
16
16
|
.addColumn("total_edges_traversed", "integer", col => col.notNull().defaultTo(0))
|
|
17
17
|
.addColumn("created_at", "text", col =>
|
|
18
|
-
col.notNull().defaultTo(
|
|
18
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
19
19
|
)
|
|
20
20
|
.execute();
|
|
21
21
|
|
|
@@ -50,7 +50,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
50
50
|
.addColumn("first_visit_time", "integer", col => col.notNull())
|
|
51
51
|
.addColumn("last_visit_time", "integer", col => col.notNull())
|
|
52
52
|
.addColumn("created_at", "text", col =>
|
|
53
|
-
col.notNull().defaultTo(
|
|
53
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
54
54
|
)
|
|
55
55
|
.execute();
|
|
56
56
|
|
|
@@ -86,7 +86,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
86
86
|
.addColumn("first_traversal_time", "integer", col => col.notNull())
|
|
87
87
|
.addColumn("last_traversal_time", "integer", col => col.notNull())
|
|
88
88
|
.addColumn("created_at", "text", col =>
|
|
89
|
-
col.notNull().defaultTo(
|
|
89
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
90
90
|
)
|
|
91
91
|
.execute();
|
|
92
92
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -55,9 +55,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
55
55
|
.ifNotExists()
|
|
56
56
|
.addColumn("key", "text", col => col.primaryKey())
|
|
57
57
|
.addColumn("config_json", "text", col => col.notNull())
|
|
58
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
58
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
59
59
|
.addColumn("created_at", "text", col =>
|
|
60
|
-
col.notNull().defaultTo(
|
|
60
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
61
61
|
)
|
|
62
62
|
.execute();
|
|
63
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -43,9 +43,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
43
43
|
.ifNotExists()
|
|
44
44
|
.addColumn("key", "text", col => col.primaryKey())
|
|
45
45
|
.addColumn("config_json", "text", col => col.notNull())
|
|
46
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
46
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
47
47
|
.addColumn("created_at", "text", col =>
|
|
48
|
-
col.notNull().defaultTo(
|
|
48
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
49
49
|
)
|
|
50
50
|
.execute();
|
|
51
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -6,9 +6,9 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
6
6
|
.ifNotExists()
|
|
7
7
|
.addColumn("key", "text", col => col.primaryKey())
|
|
8
8
|
.addColumn("config_json", "text", col => col.notNull())
|
|
9
|
-
.addColumn("updated_at", "text", col => col.notNull())
|
|
9
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
10
10
|
.addColumn("created_at", "text", col =>
|
|
11
|
-
col.notNull().defaultTo(
|
|
11
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
12
12
|
)
|
|
13
13
|
.execute();
|
|
14
14
|
}
|
|
@@ -66,7 +66,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
66
66
|
.addColumn("error_message", "text") // Error message if step failed
|
|
67
67
|
.addColumn("details_json", "text") // Additional step details as JSON
|
|
68
68
|
.addColumn("created_at", "text", col =>
|
|
69
|
-
col.notNull().defaultTo(
|
|
69
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
70
70
|
)
|
|
71
71
|
.execute();
|
|
72
72
|
|
|
@@ -91,7 +91,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
91
91
|
.addColumn("visit_order", "integer", col => col.notNull())
|
|
92
92
|
.addColumn("timestamp", "integer", col => col.notNull())
|
|
93
93
|
.addColumn("created_at", "text", col =>
|
|
94
|
-
col.notNull().defaultTo(
|
|
94
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
95
95
|
)
|
|
96
96
|
.execute();
|
|
97
97
|
|
|
@@ -111,7 +111,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
111
111
|
)
|
|
112
112
|
.addColumn("session_uuid", "text")
|
|
113
113
|
.addColumn("created_at", "text", col =>
|
|
114
|
-
col.notNull().defaultTo(
|
|
114
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
115
115
|
)
|
|
116
116
|
.execute();
|
|
117
117
|
|
|
@@ -179,7 +179,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
179
179
|
)
|
|
180
180
|
.addColumn("session_uuid", "text")
|
|
181
181
|
.addColumn("created_at", "text", col =>
|
|
182
|
-
col.notNull().defaultTo(
|
|
182
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
183
183
|
)
|
|
184
184
|
.execute();
|
|
185
185
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
async function tableExists(
|
|
4
4
|
db: Kysely<unknown>,
|
|
@@ -31,8 +31,8 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
31
31
|
.addColumn("unique_sessions", "integer", col => col.notNull().defaultTo(0))
|
|
32
32
|
.addColumn("stack_trace_json", "text") // JSON array of StackTraceElement
|
|
33
33
|
.addColumn("tool_call_info_json", "text") // JSON of AggregatedToolCallInfo
|
|
34
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
35
|
-
.addColumn("updated_at", "text", col => col.notNull().defaultTo(
|
|
34
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
35
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
36
36
|
.execute();
|
|
37
37
|
|
|
38
38
|
await db.schema
|
|
@@ -78,7 +78,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
78
78
|
.addColumn("error_code", "text") // For tool failures
|
|
79
79
|
.addColumn("duration_ms", "integer") // For tool failures
|
|
80
80
|
.addColumn("tool_args_json", "text") // For tool failures - JSON of parameters
|
|
81
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
81
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
82
82
|
.execute();
|
|
83
83
|
|
|
84
84
|
await db.schema
|
|
@@ -121,7 +121,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
121
121
|
)
|
|
122
122
|
.addColumn("screen_name", "text", col => col.notNull())
|
|
123
123
|
.addColumn("visit_order", "integer", col => col.notNull())
|
|
124
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
124
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
125
125
|
.execute();
|
|
126
126
|
|
|
127
127
|
await db.schema
|
|
@@ -145,7 +145,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
145
145
|
.addColumn("path", "text", col => col.notNull())
|
|
146
146
|
.addColumn("timestamp", "integer", col => col.notNull())
|
|
147
147
|
.addColumn("device_model", "text", col => col.notNull())
|
|
148
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
148
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
149
149
|
.execute();
|
|
150
150
|
|
|
151
151
|
await db.schema
|
|
@@ -171,7 +171,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
171
171
|
.addColumn("title", "text", col => col.notNull())
|
|
172
172
|
.addColumn("timestamp", "integer", col => col.notNull())
|
|
173
173
|
.addColumn("acknowledged", "integer", col => col.notNull().defaultTo(0)) // SQLite boolean
|
|
174
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
174
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
175
175
|
.execute();
|
|
176
176
|
|
|
177
177
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
// 1. Clear all existing navigation data (cascade handles related tables)
|
|
@@ -25,7 +25,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
25
25
|
.addColumn("last_seen_at", "integer", col => col.notNull())
|
|
26
26
|
.addColumn("occurrence_count", "integer", col => col.notNull().defaultTo(1))
|
|
27
27
|
.addColumn("created_at", "text", col =>
|
|
28
|
-
col.notNull().defaultTo(
|
|
28
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
29
29
|
)
|
|
30
30
|
.execute();
|
|
31
31
|
|
|
@@ -64,7 +64,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
64
64
|
col.references("navigation_node_fingerprints.id").onDelete("set null")
|
|
65
65
|
)
|
|
66
66
|
.addColumn("created_at", "text", col =>
|
|
67
|
-
col.notNull().defaultTo(
|
|
67
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
68
68
|
)
|
|
69
69
|
.execute();
|
|
70
70
|
|
|
@@ -86,7 +86,7 @@ export async function down(db: Kysely<unknown>): Promise<void> {
|
|
|
86
86
|
.addColumn("touch_latency_ms", "real")
|
|
87
87
|
.addColumn("diagnostics_json", "text")
|
|
88
88
|
.addColumn("created_at", "text", col =>
|
|
89
|
-
col.notNull().defaultTo(
|
|
89
|
+
col.notNull().defaultTo(sql`(datetime('now'))`)
|
|
90
90
|
)
|
|
91
91
|
.execute();
|
|
92
92
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
async function tableExists(
|
|
4
4
|
db: Kysely<unknown>,
|
|
@@ -34,7 +34,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
34
34
|
.addColumn("host", "text")
|
|
35
35
|
.addColumn("path", "text")
|
|
36
36
|
.addColumn("error", "text")
|
|
37
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
37
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
38
38
|
.execute();
|
|
39
39
|
|
|
40
40
|
await db.schema
|
|
@@ -73,7 +73,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
73
73
|
.addColumn("tag", "text", col => col.notNull())
|
|
74
74
|
.addColumn("message", "text", col => col.notNull())
|
|
75
75
|
.addColumn("filter_name", "text", col => col.notNull())
|
|
76
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
76
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
77
77
|
.execute();
|
|
78
78
|
|
|
79
79
|
await db.schema
|
|
@@ -110,7 +110,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
110
110
|
.addColumn("session_id", "text")
|
|
111
111
|
.addColumn("name", "text", col => col.notNull())
|
|
112
112
|
.addColumn("properties_json", "text") // JSON of string key-value pairs
|
|
113
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
113
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
114
114
|
.execute();
|
|
115
115
|
|
|
116
116
|
await db.schema
|
|
@@ -148,7 +148,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
148
148
|
.addColumn("category", "text", col => col.notNull()) // lifecycle, broadcast, websocket_frame
|
|
149
149
|
.addColumn("kind", "text", col => col.notNull()) // e.g., foreground, screen_on, connectivity_change
|
|
150
150
|
.addColumn("details_json", "text") // JSON of additional details
|
|
151
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
151
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
152
152
|
.execute();
|
|
153
153
|
|
|
154
154
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -13,7 +13,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
13
13
|
.addColumn("source", "text")
|
|
14
14
|
.addColumn("arguments_json", "text")
|
|
15
15
|
.addColumn("metadata_json", "text")
|
|
16
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
16
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
17
17
|
.execute();
|
|
18
18
|
|
|
19
19
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -14,7 +14,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
14
14
|
.addColumn("value", "text")
|
|
15
15
|
.addColumn("value_type", "text")
|
|
16
16
|
.addColumn("change_type", "text", col => col.notNull())
|
|
17
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
17
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
18
18
|
.execute();
|
|
19
19
|
|
|
20
20
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -16,7 +16,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
16
16
|
.addColumn("duration_ms", "integer")
|
|
17
17
|
.addColumn("likely_cause", "text")
|
|
18
18
|
.addColumn("details_json", "text")
|
|
19
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
19
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
20
20
|
.execute();
|
|
21
21
|
|
|
22
22
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema.dropTable("custom_events").ifExists().execute();
|
|
@@ -15,7 +15,7 @@ export async function down(db: Kysely<unknown>): Promise<void> {
|
|
|
15
15
|
.addColumn("session_id", "text")
|
|
16
16
|
.addColumn("name", "text", col => col.notNull())
|
|
17
17
|
.addColumn("properties_json", "text")
|
|
18
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
18
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
19
19
|
.execute();
|
|
20
20
|
|
|
21
21
|
await db.schema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
2
|
|
|
3
3
|
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
4
|
await db.schema
|
|
@@ -20,8 +20,8 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
20
20
|
.addColumn("session_timeout_ms", "integer", col => col.notNull())
|
|
21
21
|
.addColumn("heartbeat_timeout_ms", "integer", col => col.notNull())
|
|
22
22
|
.addColumn("has_received_heartbeat", "integer", col => col.notNull().defaultTo(0))
|
|
23
|
-
.addColumn("created_at", "text", col => col.notNull().defaultTo(
|
|
24
|
-
.addColumn("updated_at", "text", col => col.notNull().defaultTo(
|
|
23
|
+
.addColumn("created_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
24
|
+
.addColumn("updated_at", "text", col => col.notNull().defaultTo(sql`(datetime('now'))`))
|
|
25
25
|
.execute();
|
|
26
26
|
|
|
27
27
|
await db.schema
|