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

allow libsql to work with versioned migrations #2620

Closed
wants to merge 2 commits into from

Conversation

golanglemonade
Copy link

@golanglemonade golanglemonade commented Mar 15, 2024

Issue:

  • When using libsql with versioned migrations I would get an "unsupported dialect" error from Ent
  • The old libsql driver did not support time.Time

PR Includes:

  • Updates the libsql client to the github.com/tursodatabase/libsql-client-go
  • Uses the dialect.Sqlite for ent versioned migrations when using libsql driver

This allows the use of the following in migrations:

env "turso" {
  url     = "libsql://<REPLACE WITH YOUR SUBDOMAIN>?authToken=${var.token}"
  exclude = ["_litestream*"]
}

Relates to: #2338

Signed-off-by: Golang Lemonade <[email protected]>
return dialect.SQLite
}

return r.ac.Name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, but I prefer not to mix driver logic with cmdapi.

Drivers can implement their own RevisionsReadWriter, and I need to move this implementation out so the libsql driver one can reuse it.

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.

2 participants