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

chore: Upgrade SeaORM to the latest version #4793

Closed
ameten opened this issue Oct 31, 2024 · 1 comment · Fixed by #4925 · May be fixed by #5041
Closed

chore: Upgrade SeaORM to the latest version #4793

ameten opened this issue Oct 31, 2024 · 1 comment · Fixed by #4925 · May be fixed by #5041
Labels
extra-small bounty size

Comments

@ameten
Copy link
Contributor

ameten commented Oct 31, 2024

Problem

Currently we are using obsolete version of SeaORM, namely 0.11.1 and we generate entities using version 0.12.3. It produces different source code for the entities which a developer has to remove when the developer changes the migration scripts.

Solution

Upgrade SeaORM to the latest version everywhere:

  1. To be used for migrations
  2. To be used for generating entities
  3. To be used by Scraper to interact with Postgres DB

Tasks

  1. Upgrade SeaORM in main/Cargo.toml (sea-orm and sea-orm-migration).
  2. Upgrade SeaORM in generate_entities.rs and regenerate entities. Make sure that new datatypes can handle existing data without issues.
  3. Make the code compilable again.
  4. Remove SeaORM from sealevel/Cargo.toml.

Testing

  1. Run Scraper from mainstream branch with current SeaORM version and populate database with data from some blockchain
  2. Switch to the feature branch with the latest SeaORM version.
  3. Run Scraper from feature brach and confirm that all the data is populated in the same format as before
@tkporter
Copy link
Collaborator

@Mantas-M is doing this (can't assign on github bc he's not in the org)

github-merge-queue bot pushed a commit that referenced this issue Dec 17, 2024
### Description

Updated `sea-orm` and `sea-orm-migration` to `1.1.1` (latest as of
opening this PR) and resolved any issues that occurred due to the
version bump.

### Drive-by changes

- Removed `sea-orm` from `rust/sealevel`
- Updated `sea-orm-migration` data types
- Bumped up the `rust-toolchain` to `1.81.0` due to `sea-orm-cli` issue:
servo/rust-url#992

### Related issues

- Resolves #4793

### Backward compatibility

Yes

### Testing

Manual, as described in #4793
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this issue Jan 11, 2025
### Description

Updated `sea-orm` and `sea-orm-migration` to `1.1.1` (latest as of
opening this PR) and resolved any issues that occurred due to the
version bump.

### Drive-by changes

- Removed `sea-orm` from `rust/sealevel`
- Updated `sea-orm-migration` data types
- Bumped up the `rust-toolchain` to `1.81.0` due to `sea-orm-cli` issue:
servo/rust-url#992

### Related issues

- Resolves hyperlane-xyz#4793

### Backward compatibility

Yes

### Testing

Manual, as described in hyperlane-xyz#4793
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this issue Jan 11, 2025
### Description

Updated `sea-orm` and `sea-orm-migration` to `1.1.1` (latest as of
opening this PR) and resolved any issues that occurred due to the
version bump.

### Drive-by changes

- Removed `sea-orm` from `rust/sealevel`
- Updated `sea-orm-migration` data types
- Bumped up the `rust-toolchain` to `1.81.0` due to `sea-orm-cli` issue:
servo/rust-url#992

### Related issues

- Resolves hyperlane-xyz#4793

### Backward compatibility

Yes

### Testing

Manual, as described in hyperlane-xyz#4793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment