Skip to content

Conversation

@rod-glover
Copy link
Contributor

@rod-glover rod-glover commented Aug 13, 2025

Resolves #239

Notes:

  • At time of writing, a full suite of functions, table definitions, etc. plus some basic tests are all in a single file in pure SQL. This was convenient for early development. This file can be split up into regular Alembic migration components (e.g., ReplaceableFunction definitions) and provides some hints at the tests that will be needed.
  • It's interesting but perhaps dangerous to wonder if such a file of SQL should be programmatically split up into Alembic components (see above), rather than manually.
  • At time of writing, there are no stored procedures and therefore no need to complete issue Add support for stored procedures #247 .

TODO:

  • ? Complete Add support for stored procedures #247 before this issue and rebase onto master after merging it ... unless there is no need for SP's, which it appears there may not be.
  • Documentation - in pretty good shape but needs
    • Remove superfluous early/pseudo code and other implementation info. Much has been settled now and this was mostly me talking to myself in early phases.
    • Discuss id column vs mod_time for various purposes, including defining valid (ref. integ.) subsets of the history and bookmarking.
    • Discussion of support ... which bears on the following ...
    • Problem area: Generic to history tracking: Order of updates to tables -- what is the "frozen" state of history when updates are made. E.g., update metadata, then update some observations that depend on it. Do you want to link to the current metadata, or do you want to isolate the observations in an earlier metadata history point so that the update preserves that older metadata? And related problems.
    • Review for clarity, organization, etc.
  • ORM - update from single file
  • Functions and procedures
    • Get latest undeleted history id's given a condition
    • Get latest undeleted history records given a condition
    • Get current history tuple
    • Check validity of a history tuple
  • Trigger functions
    • Ensure provided history tuple is valid
    • Apply constraints and default for bracket_begin_id on insert to bookmark_associations for bracket-end
  • Migration
    • Convert development file to Alembic components
    • Create Alembic migration
    • Write tests for all new functions and for migration

@rod-glover rod-glover force-pushed the i-239-version-tagging branch from 8bbbbb6 to 296b966 Compare September 9, 2025 04:10
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.

Implement bookmarking aka version tagging

2 participants