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

Ecto Migration lock and DDL transaction support #87

Open
dbernheisel opened this issue Aug 17, 2022 · 3 comments
Open

Ecto Migration lock and DDL transaction support #87

dbernheisel opened this issue Aug 17, 2022 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@dbernheisel
Copy link

I noticed that this adapter doesn't seem to support DDL transactions or a migration lock during ecto migrations. Does that support need to be implemented?

I'm probably missing something, but I figure that a DDL transaction can be started with exclusive mode, and perhaps the migration lock is satisfied with a file lock?

https://github.com/elixir-sqlite/ecto_sqlite3/blob/main/lib/ecto/adapters/sqlite3.ex#L218-L224

I'll be happy to contribute if there's a clear way forward.

@warmwaffles
Copy link
Member

I don't know if SQLite actually supports DDL transactions, but like you said, we could "fake" it with exclusive. I didn't implement it because ecto sqlite 2 did not implement it.

@warmwaffles warmwaffles added enhancement New feature or request question Further information is requested labels Aug 17, 2022
@recursiveGecko
Copy link

I don't know if SQLite actually supports DDL transactions

ALTER TABLE documentation confirms that it does, as well as this simple demo:

image

Having support for DDL transactions would be really appreciated!

@warmwaffles
Copy link
Member

I'll take a look into this. I'll check if there is some upstream integration tests that test the DDL transactions and see if we can get that implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants