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

Connection does not automatically close #884

Closed
zbinhazzaa opened this issue Jul 18, 2022 · 2 comments
Closed

Connection does not automatically close #884

zbinhazzaa opened this issue Jul 18, 2022 · 2 comments

Comments

@zbinhazzaa
Copy link

Expected Behavior

I run

use migration::{Migrator, MigratorTrait};

let connection = sea_orm::Database::connect(&database_url).await?;
Migrator::up(&connection, None).await?;

I expected that at the end of the app the DB would close.

Actual Behavior

Db does not close at the end of the app and still has .shm and .wal files.
I had this problem trying to copy the Db after the migration ended.

@billy1624
Copy link
Member

Hey @zbinhazzaa, thanks for the report! This has to do with the underlying database connector: SQLx.

Related Issues:

I think at SeaORM we could introduce an async close method to close the connection.

@billy1624 billy1624 moved this to Triage in SeaQL Dev Tracker Jul 18, 2022
@billy1624 billy1624 moved this from Triage to Next Up in SeaQL Dev Tracker Aug 10, 2022
@billy1624 billy1624 moved this from Next Up to Triage in SeaQL Dev Tracker Jan 13, 2023
@tyt2y3 tyt2y3 closed this as completed Feb 21, 2023
@tyt2y3 tyt2y3 changed the title Setting Up Migration Connection does not automatically close Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants