refactor: replace tokens_module with sessions_module in export #675
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: replace tokens_module with sessions_module in export
Summary
Updates the export functionality to use the new
sessions_moduleinstead of the deprecatedtokens_module. This is part of the session-centric auth migration where all authentication tokens now live insession_credentialstable instead ofapi_tokens.Changes:
tokens_modulewithsessions_moduleintableOrderarray (export-migrations.ts)tokens_moduleconfig withsessions_moduleconfig with new field structure (export-meta.ts)tokens_table_idwithsessions_table_idandsession_credentials_table_idinrls_moduleconfigtokens_table_idwithsessions_table_idandsession_credentials_table_idinuser_auth_moduleconfig (also added missingaudits_table_id,audits_table_name,verify_password_function,check_password_function)tokens_table_idwithsessions_table_idandsession_credentials_table_idincrypto_auth_moduleconfigReview & Testing Checklist for Human
rls_module,user_auth_module,crypto_auth_module, andsessions_moduleconfigs against the actual table definitions in constructive-db to ensure they match exactlygenerate:constructiveor similar export command after dependent PRs are merged to verify the export works end-to-endNotes
packages/csv-to-pg/__tests__/export.test.tsstill usestokens_moduleas an example table name for parser tests - this is just a test fixture and doesn't affect functionality__fixtures__/output/schemas/services_public.tsfile will need to be regenerated after the dependent PRs are mergedLink to Devin run: https://app.devin.ai/sessions/d30b2724020f43f6b94865bbd5cf71c6
Requested by: Dan Lynch (@pyramation)