Skip to content

Conversation

@austin-hall-skylight
Copy link
Collaborator

@austin-hall-skylight austin-hall-skylight commented Sep 12, 2025

PULL REQUEST

Summary

Sets default schema for Kysley migration tables to match the schema of the other tables we are creating instead of writing them to the database default. Removes schema creation from init migration.

Related Issue

Fixes #1102

Acceptance Criteria

  • Create a script (or scripts, this needs to work for both DB types) for upgrading users to run manually which copies the data from both of their default schema migration tables into a new version under the ecr_viewer schema.
  • Coordinate with devOps to create the ecr_viewer schema during the infrastructure setup stage
  • Update migrations to no longer create schema, and change the initial migration to throw if the ecr_viewer schema does NOT exist
  • Update the getMigrator function in migrate.ts to specify that migrationTableName and migrationLockTableName fall under the ecr_viewer schema
  • Write clear documentation for STLTs making this upgrade to follow

Additional Information

Anything else the review team should know?

Checklist

  • If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.53%. Comparing base (428fd96) to head (93f0340).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...grate-db/migrations/core/19700101000000_initial.ts 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
+ Coverage   86.03%   90.53%   +4.49%     
==========================================
  Files         253      174      -79     
  Lines       11248     6505    -4743     
  Branches     1189     1198       +9     
==========================================
- Hits         9677     5889    -3788     
+ Misses       1564      609     -955     
  Partials        7        7              
Flag Coverage Δ
ecr-viewer 91.72% <66.66%> (-0.05%) ⬇️
ingestion ?
message-parser ?
orchestration 85.12% <ø> (ø)
trigger-code-reference ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@austin-hall-skylight austin-hall-skylight marked this pull request as ready for review September 22, 2025 17:49
@austin-hall-skylight austin-hall-skylight requested a review from a team as a code owner September 22, 2025 17:49
@austin-hall-skylight austin-hall-skylight requested review from JNygaard-Skylight and gordonfarrell and removed request for a team September 22, 2025 17:49
@austin-hall-skylight austin-hall-skylight marked this pull request as draft September 23, 2025 15:51
@austin-hall-skylight austin-hall-skylight changed the title fix: set default schema for kysely migration tables major: set default schema for kysely migration tables Sep 24, 2025
@austin-hall-skylight
Copy link
Collaborator Author

Waiting for this PR to be merged and released before this can be completed.

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.

Move Kysely Migration tables to ecr_viewer schema

3 participants