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

Error: sql/schema: unsupported dialect "libsql" #2338

Open
arjunyel opened this issue Dec 5, 2023 · 13 comments
Open

Error: sql/schema: unsupported dialect "libsql" #2338

arjunyel opened this issue Dec 5, 2023 · 13 comments

Comments

@arjunyel
Copy link

arjunyel commented Dec 5, 2023

When running the command: atlas migrate apply --env "turso" I get the error Error: sql/schema: unsupported dialect "libsql"

My atlas.hcl:

env "turso" {
  url     = "libsql+ws://127.0.0.1:8080"
  exclude = ["_litestream*"]
}
@masseelch
Copy link
Member

Can you provide me the output of atlas version, please?

@arjunyel
Copy link
Author

arjunyel commented Dec 6, 2023

@masseelch Thank you for taking a look friend! atlas version v0.15.1-143f43e-canary

@masseelch
Copy link
Member

masseelch commented Dec 6, 2023

For versioned migrations, Atlas stores some meta-data about the migration process in a separate table / schema. We use Ent for this, but Ent does not have support for libsql which is the reason it does not work. (If I recall correctly, there was some issue with time.Time parsing).

cc @haaawk, who added the turso integration.

@haaawk
Copy link
Contributor

haaawk commented Dec 6, 2023

We fixed the time.Time parsing in libsql client so maybe it will be enough to update it's version it Atlas. I will send a PR

@haaawk
Copy link
Contributor

haaawk commented Dec 6, 2023

This might help #2341

@arjunyel
Copy link
Author

arjunyel commented Dec 6, 2023

Does libsql support still need to be added to ent for this to work?

@haaawk
Copy link
Contributor

haaawk commented Dec 6, 2023

Does libsql support still need to be added to ent for this to work?

Not sure. It's been a while since I checked ent.

@arjunyel
Copy link
Author

arjunyel commented Dec 6, 2023

For versioned migrations, Atlas stores some meta-data about the migration process in a separate table / schema. We use Ent for this, but Ent does not have support for libsql which is the reason it does not work. (If I recall correctly, there was some issue with time.Time parsing).

cc @haaawk, who added the turso integration.

I think based on this message Ent is where the error is originating from

@asterikx
Copy link

asterikx commented Dec 7, 2023

I get the same error with Turso with versioned migrations, declarative workflow works just fine.

atlas version v0.15.1-96e920d-canary

@arjunyel
Copy link
Author

@haaawk is it possible to add Ent support to the TODO list? 😄 Thank you friend

@arjunyel
Copy link
Author

@haaawk sorry for the ping again, is there somewhere we can officially request this feature and get it tracked?

@haaawk
Copy link
Contributor

haaawk commented Feb 20, 2024

I put Ent support on my list but unfortunately there are many other items with higher priority at the moment.

libsql-client-go supports already time.Time so maybe it's enough to update the libsql-client-go version that atlas is using. I encourage you to give it a try :).

@arjunyel
Copy link
Author

@PietervdWerk hi friend, how come you said this isn't an Ent issue when the Atlas maintainer above said they use Ent for the versioned migrations? Atlas does work already for declarative migrations

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

No branches or pull requests

4 participants