Skip to content

#171: Migrate Submission records separation#206

Open
leoraba wants to merge 63 commits into
mainfrom
feat/submission_records_separation
Open

#171: Migrate Submission records separation#206
leoraba wants to merge 63 commits into
mainfrom
feat/submission_records_separation

Conversation

@leoraba

@leoraba leoraba commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR creates a SQL script to migrate legacy submission payloads into a normalized structure by creating one row record per submitted item.

Issues

This PR is part 1 of a series of PRs to complete issue # 171

Description of Changes

Package 'Data-model'

  • Added 2 new Drizzle scripts
    • 0014_create_submission_records_table.sql DDL migration that creates the new submission_files and submission_records tables.
    • 0015_CUSTOM_migrate_submission_records.sql custom DML migration that moves existing data into the new schema.
  • Updated docs:
    • schema.dbml
    • docs/README.md

Readiness Checklist

  • Self Review
    • I have performed a self review of code
    • I have run the application locally and manually tested the feature
    • I have checked all updates to correct typos and misspellings
  • Formatting
    • Code follows the project style guide
    • Autmated code formatters (ie. Prettier) have been run
  • Local Testing
    • Successfully built all packages locally
    • Successfully ran all test suites, all unit and integration tests pass
  • Updated Tests
    • Unit and integration tests have been added that describe the bug that was fixed or the features that were added
  • Documentation
    • All new environment variables added to .env.schema file and documented in the README
    • All changes to server HTTP endpoints have open-api documentation
    • All new functions exported from their module have TSDoc comment documentation

leoraba added 18 commits May 4, 2026 08:47
* database changes

* update dbml

* migration services

* updates migration repository

* update migration service

* data validation

* refactor migration process

* block commit submission

* fix sort imports

* update docs

* migration table index

* fix typos and logs

* migration audit and logs

* migration on worker thread

* GET migration endpoints

* fix unit tests

* GET migration records

* adding ts config noUncheckedIndexedAccess

* rename migration enum status IN_PROGRESS

* refactoring migration function with Result

* default constants pagination

* change logs and response NotFound

* fix swagger docs

* include errors or migration changes

* type paginated result

* using type paginated result

* unit test migration formatter functions

* remove unhandled error thrown

* return 200 json response

* tsdocs updates

* swagger docs update
@leoraba leoraba marked this pull request as draft June 9, 2026 17:44
@leoraba leoraba marked this pull request as ready for review June 12, 2026 17:40
@leoraba leoraba changed the base branch from main to feat/interation-test-migration June 12, 2026 17:47
@leoraba leoraba requested review from JamesTLopez, Copilot and joneubank and removed request for Copilot June 12, 2026 17:48
Base automatically changed from feat/interation-test-migration to feat/dictionary_migration July 9, 2026 15:14
Base automatically changed from feat/dictionary_migration to main July 10, 2026 13:31
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