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

feat: Add SeaORM migrations and utils to create user table #284

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

spencewenski
Copy link
Member

It is pretty common that an application will need a user table in its DB. This PR adds a sensible default schema via SeaORM migrations, collected into a common UserMigration struct (that implements SeaORM's MigratorTrait).

Also, add the migrations in the full example to demonstrate usage and what the generated entity structs look like.

It is pretty common that an application will need a
`user` table in its DB. This PR adds a sensible default schema via
SeaORM migrations, collected into a common `UserMigration` struct (that
implements SeaORM's `MigratorTrait`).

Also, add the migrations in the `full` example to demonstrate usage and
what the generated entity structs look like.
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 62.87879% with 49 lines in your changes missing coverage. Please review.

Project coverage is 45.78%. Comparing base (741c0ef) to head (4d307cb).

Files Coverage Δ
src/migration/user/create_table.rs 100.00% <100.00%> (ø)
src/migration/check.rs 66.66% <66.66%> (ø)
.../user/m20240714_203550_create_user_table_int_pk.rs 0.00% <0.00%> (ø)
...user/m20240714_203551_create_user_table_uuid_pk.rs 0.00% <0.00%> (ø)
...40723_070533_add_user_account_management_fields.rs 83.33% <83.33%> (ø)
src/migration/user/mod.rs 14.28% <14.28%> (ø)
src/migration/schema.rs 53.65% <53.65%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 741c0ef...4d307cb. Read the comment docs.

@spencewenski spencewenski merged commit 50a17b2 into main Jul 23, 2024
15 checks passed
@spencewenski spencewenski deleted the user-migration branch July 23, 2024 08:48
@github-actions github-actions bot mentioned this pull request Jul 24, 2024
spencewenski pushed a commit that referenced this pull request Jul 24, 2024
## 🤖 New release
* `roadster`: 0.5.8 -> 0.5.9

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.5.9](roadster-v0.5.8...roadster-v0.5.9)
- 2024-07-24

### Added
- Auto-update timestamp columns
([#287](#287))
- Add SeaORM migrations and utils to create `user` table
([#284](#284))

### Other
- Disallow `unwrap` and `expect` except in tests
([#286](#286))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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