refactor: migrate from tokens_module to sessions_module#39
Merged
pyramation merged 6 commits intomainfrom Jan 28, 2026
Merged
Conversation
BREAKING CHANGE: tokens_module has been removed entirely. - Remove tokens_module (deploy, revert, verify) - Add sessions_module for session-centric authentication - Update crypto_auth_module to use sessions_table_id and session_credentials_table_id - Update user_auth_module to use sessions_table_id and session_credentials_table_id - Update pgpm.plan to reflect new module dependencies - Update tests to remove tokens_module references
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor: migrate from tokens_module to sessions_module
Summary
BREAKING CHANGE: This PR completely removes
tokens_moduleand replaces it withsessions_modulefor session-centric authentication.Key changes:
tokens_module(deploy/revert/verify SQL files)sessions_modulewith columns forsessions_table,session_credentials_table, andauth_settings_tablecrypto_auth_moduleto usesessions_table_idandsession_credentials_table_idinstead oftokens_table_iduser_auth_modulesimilarly - replaced tokens references with sessions referencespgpm.planto reflect new module dependenciessessions_modulestructure instead oftokens_moduleReview & Testing Checklist for Human
This is a breaking change affecting core authentication infrastructure. Please verify:
tokens_moduleortokens_table_idcolumnspgpm deployand verify the newsessions_moduletable is created correctly with all FK constraintssessions_table_fkeyandsession_credentials_table_fkeyconstraints should referencemetaschema_public.tablecorrectlypnpm testinpackages/metaschema-modulesto verify all tests pass with the new structuretokens_moduledata, plan for migration before deployingRecommended Test Plan
pnpm testin the metaschema-modules packagesessions_moduletable exists with correct columnscrypto_auth_moduleanduser_auth_moduletables have the newsessions_table_idandsession_credentials_table_idcolumnsNotes
This change is part of a larger migration from token-based auth to session-centric auth in the constructive-db ecosystem. The companion PR in constructive-db (PR #458) contains the corresponding changes to the auth functions.
Link to Devin run: https://app.devin.ai/sessions/d30b2724020f43f6b94865bbd5cf71c6
Requested by: @pyramation