-
Notifications
You must be signed in to change notification settings - Fork 4
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
New Sqlite3 driver #3
Conversation
9d63f2b
to
a75787e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the formatting, I always forget to run dune fmt
to format dune files as the code is autoformatted on my editor 😅
Thanks @maiste! I tried to run the driver on example migrations (that I pushed to the
Do you know what's going wrong? |
I replicate the issue: it seems to struggle with the relative path. If you put an absolute path, it will work. Investigate the way to fix that. Update: Update-2: This is not supported as it's part of the RFC not to support it:
IMHO, we have to keep it this way but provide an example about the right way to write a URI for $ omigrate setup -d "sqlite3://$PWD/my_db.db" -s "./example" WDYT @tmattio? |
Ensure compatibility
Thanks @maiste! Sorry for the noise, I thought it was supported, but if the RFC is explicit about not supporting it, we shouldn't either! I still have an error running the migrations though. After cleaning the SQL bits from the migrations that are not supported by sqlite3, I have the following error:
|
I pushed some changes to fix this bug. The
As
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
CHANGES: - Support partial migrations (tmattio/omigrate#4, @maiste) - New Sqlite3 driver (tmattio/omigrate#3, @maiste) - Support optional auth with psql driver (tmattio/omigrate#2, @maiste)
This PR introduces a driver for
Sqlite3
. It relies onsqlite3-ocaml
to stay as low level as possible.It requires #2 to be merged to support this new driver.