-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace DB package tables by sip and aip tables #1121
Conversation
120cf64
to
dd6d7dc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1121 +/- ##
=======================================
Coverage 54.71% 54.72%
=======================================
Files 105 105
Lines 7713 7719 +6
=======================================
+ Hits 4220 4224 +4
- Misses 3231 3234 +3
+ Partials 262 261 -1 ☔ View full report in Codecov by Sentry. |
dd6d7dc
to
04267c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew, finished the review. 😅
It looks great overall @jraddaoui.
In the database migrations it would be nice to avoid updating all of the column definitions, as I don't think they've actually changed, but that may just be a quirk of Atlas.
I've flagged a number of minor renaming issues, but I don't think there's any serious blockers.
Quick question, are migrations applied by the app each time it starts, or should a migration command be run before the app starts? |
In this project we use versioned migrations even if they are applied on the application start, so there is no need of an extra command. The |
04267c8
to
4e6a371
Compare
Stop using package across the persistence layers. Use SIP on ingest and AIP on storage renaming DB tables, types and enums. The use of package still happens on the API design/spec and the dashboard, these will be modified in following PRs. - Allow generating migrations for both databases using ariga.io/atlas. - Add `atlas-hash` Make rule to re-generate sum file in migration dirs. - Update ingest database, ent schema and client: - Rename `package` table to `sip`. - Adapt `preservation_action` table relation. - Generate `use_atlas` migration to match schema from ent/Atlas. - Rename package related functions. - Update storage database, ent schema and client: - Rename `package` table to `aip`. - Rename package related functions. - Rename datatype SIP and PreservationAction.SIPID. - Rename SIP statuses and types. - Rename AIP statuses.
4e6a371
to
5f10106
Compare
Stop using package across the persistence layers. Use SIP on ingest
and AIP on storage renaming DB tables, types and enums. The use of
package still happens on the API design/spec and the dashboard, these
will be modified in following PRs.
atlas-hash
Make rule to re-generate sum file in migration dirs.package
table tosip
.preservation_action
table relation.use_atlas
migration to match schema from ent/Atlas.package
table toaip
.Refs #1117.