Skip to content
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

[Reputation Oracle] refactor: typeorm usage #3154

Merged
merged 4 commits into from
Mar 5, 2025
Merged

Conversation

dnechay
Copy link
Contributor

@dnechay dnechay commented Mar 4, 2025

Issue tracking

Part of #3084

Context behind the change

Tip

Easier to review commit-by-commit

This work is a prerequisite for moving on with modules refactoring that depend on typeorm.
Main change is to use "Data Mapper" approach instead of "Active Record" (typeorm ref) so we don't have to care about OrmBaseEntity methods being exposed out of repository. In follow-up PRs for each separate module we will work on better typings and improving approach on service-repository-datamodel usage.

Also cleaned up DataSource configurations to be meaningful and use only valid options.

Warning

We have two different DataSource configs: one for application, one for migrations. Because of that we keep using database schema name in each @Entity decorator

How has this been tested?

  • run application locally; e2e test of sign-in flow, make sure created_at and updated_at are added to token entity
  • run migrations locally, should finish successfully with no pending migrations
  • add new column to some entity, run yarn migration:generate testMigrationName and verify that migration generated properly

Release plan

Simply merge

Potential risks; What to monitor; Rollback plan

Should be none

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
human-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 1:39pm
human-dashboard-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 1:39pm
staking-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 1:39pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
faucet-frontend ⬜️ Ignored (Inspect) Visit Preview Mar 5, 2025 1:39pm
faucet-server ⬜️ Ignored (Inspect) Visit Preview Mar 5, 2025 1:39pm

@Dzeranov Dzeranov merged commit 64de1ac into develop Mar 5, 2025
12 checks passed
@Dzeranov Dzeranov deleted the dnechay/3084-typeorm branch March 5, 2025 16:11
@dnechay dnechay mentioned this pull request Mar 5, 2025
29 tasks
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.

2 participants