Skip to content

feat: store fix timestamp (ts) with every track point - #2

Open
vkeskinen wants to merge 1 commit into
masterfrom
feat/track-point-timestamps
Open

feat: store fix timestamp (ts) with every track point#2
vkeskinen wants to merge 1 commit into
masterfrom
feat/track-point-timestamps

Conversation

@vkeskinen

Copy link
Copy Markdown

Summary

  • Adds a `ts INTEGER` column (epoch ms) to the `tracks` table and writes the fix time with every point, on iOS and Android.
  • iOS: idempotent `ALTER TABLE` on first write; `ts` from `CLLocation.timestamp`.
  • Android: `TrackDbHelper` bumped to schema v2 — now creates the table itself, adds the column in `onUpgrade`/`onOpen`, and no-ops `onDowngrade` so an older app build opening a newer file keeps recording instead of crashing the service. `ts` from `Location.getTime()`.
  • Version 0.18.0 (tag pushed with this PR).

Needed by sailmate_flutter's voyage photos/notes feature (the app opens the same file at sqflite version 2).

Test plan

  • Record on Android: `adb shell` sqlite3 on `sailmate_tracks.db` shows `ts` populated
  • Record on iOS: container DB shows `ts` populated
  • Upgrade path: existing v1 DB gets the column without losing rows

🤖 Generated with Claude Code

Adds a ts INTEGER column (epoch ms) to the tracks table on both platforms
so the app can attach timed media to a track and compute real speeds.

- iOS: idempotent ALTER TABLE on first write, ts from CLLocation.timestamp
- Android: TrackDbHelper schema v2 — creates the table itself, adds the
  column in onUpgrade/onOpen, and no-ops onDowngrade so an older build
  opening a newer file keeps recording; ts from Location.getTime()

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant